Skip to content

Commit

Permalink
demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Aug 17, 2024
1 parent 68792b6 commit 4e1ab97
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 113 deletions.
43 changes: 43 additions & 0 deletions .erb/scripts/version-bump.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');

const rootPackagePath = path.join(__dirname, '..', '..', 'package.json');
const appPackagePath = path.join(
__dirname,
'..',
'..',
'release',
'app',
'package.json',
);

function updateVersion(type) {
// Update root package.json
execSync(`npm version ${type} --no-git-tag-version`);

// Read the new version from root package.json
const rootPackage = JSON.parse(fs.readFileSync(rootPackagePath, 'utf8'));
const newVersion = rootPackage.version;

// Update app package.json
const appPackage = JSON.parse(fs.readFileSync(appPackagePath, 'utf8'));
appPackage.version = newVersion;
fs.writeFileSync(appPackagePath, JSON.stringify(appPackage, null, 2));

console.log(`Version bumped to ${newVersion}`);

// Stage changes
execSync('git add package.json release/app/package.json');

// Commit changes
execSync(`git commit -m "Bump version to ${newVersion}"`);
}

const versionType = process.argv[2];
if (!['patch', 'minor', 'major'].includes(versionType)) {
console.error('Please specify version type: patch, minor, or major');
process.exit(1);
}

updateVersion(versionType);
128 changes: 17 additions & 111 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Cinematic
===========
>
> 🎥 A gorgeous Desktop UI for your digital movie collection, works on Mac, Windows, and Linux!
**Have a digital movie collection?**
Expand All @@ -17,18 +18,17 @@ Organize your movies by genre and sort by popularity, release date, runtime, or

Cinematic prefers filenames like `Independence Day [1996].mp4` but will happily parse torrent-style `Movies.That.Look.Like.This.2015.HDRip.XviD.XXX-XXX.AVI`.


### Features

* 🎭 Filter movies by genre
* 🖇 Sort movies by name, popularity, release date, runtime, or randomly
* 🚥 Read plotlines and summarys before watching
* 🎬 Watch multiple trailers
* 🥃 Jump straight to the IMDB page
* 🍱 Keep track of recently viewed and recently watched
* 🍅 Cycle through ratings from IMDB, TMDB, and Metacritic
* ☔️ Network throttled requests to avoid timeouts
* 🐠 Built-in caching of genres and movies
* 🖇 Sort movies by name, popularity, release date, runtime, or randomly

### Information provided

Expand All @@ -44,136 +44,42 @@ Cinematic prefers filenames like `Independence Day [1996].mp4` but will happily
* Awards
* Runtime


# Installation
## Installation

### [Visit the Releases page to download Cinematic for Windows, OSX, and Linux](https://github.com/lacymorrow/cinematic/releases)

# Design
## Design

UI design by [ShadCN](https://ui.shadcn.com)

Original interface design by [Steve Hernandez](http://slhernandez.com/2013/09/10/Movie-App/).
> Original interface design by [Steve Hernandez](http://slhernandez.com/2013/09/10/Movie-App/) (No longer used).
* Built with [Electron](https://electronjs.org/)
* APIs provided by TMDB and OMDB


# Road map
## Road map

**Update Oct. 27, 2019:** Currently refactoring the codebase to make a clear upgrade path to faster, leaner product.

- [ ] Save images to cache
- [X] A11y - tab index, keyboard controls
- [X] Speed boost
- [X] File open dialog
- [X] Windows Release

* [ ] Save images to cache
* [X] A11y - tab index, keyboard controls
* [X] Speed boost
* [X] File open dialog
* [X] Windows Release

### Need help?

Please post any questions or issues you come across to our [issues page](https://github.com/lacymorrow/cinematic/issues).

## Development

```bash
# Run dev app
yarn start
```

## Production

### Auto Update

After publishing your first version, you can enable auto-update by uncommenting the `update` function contents in `src/main/auto-update.ts`.

## BuiltWith

- [Electron](https://electronjs.org/)
- [React](https://reactjs.org/)
- [React Router](https://reacttraining.com/react-router/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Shadcn](https://ui.shadcn.com/)
- [TypeScript](https://www.typescriptlang.org/)


## Development

### Tailwind CSS

We use Tailwind CSS for styling. See the [Tailwind CSS docs](https://tailwindcss.com/docs) for more information.

Some Tailwind plugins have been added for convenience:

- [Tailwind Animate](https://github.com/jamiebuilds/tailwindcss-animate) - `tailwindcss-animate`
- [Tailwind Container Queries](https://github.com/tailwindlabs/tailwindcss-container-queries) - `@tailwindcss/container-queries`
- Child selectors to target immediate children like `child:w-xl`
- Don't forget group selectors too: `group` (Parent) `group-hover:bg-gray-100` (Child)

### Shadcn

Shadcn is a UI component library for React. See the [Shadcn docs](https://ui.shadcn.com/) for more information.
Use `npx shadcn-ui@latest add accordion ...` to add a component to your project.

_Current installation command (to update all ui components):_

```sh
npx shadcn-ui@latest add button checkbox dropdown-menu form input menubar radio-group scroll-area select separator sonner switch textarea
```
_To list components with updates: `npx shadcn-ui@latest diff`_
## Electron-React-Boilerplate Docs
See the Electron React Boilerplate [docs and guides here](https://electron-react-boilerplate.js.org/docs/installation)
### Tutorials
- Creating multiple windows: https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/623#issuecomment-1382717291
* [Electron](https://electronjs.org/)
* [React](https://reactjs.org/)
* [React Router](https://reacttraining.com/react-router/)
* [Tailwind CSS](https://tailwindcss.com/)
* [Shadcn](https://ui.shadcn.com/)
* [TypeScript](https://www.typescriptlang.org/)

## License

MIT © [Lacy Morrow](https://github.com/lacymorrow)
[github-actions-status]: https://github.com/lacymorrow/electron-shadcn-boilerplate/workflows/Build/badge.svg
[github-actions-url]: https://github.com/lacymorrow/electron-shadcn-boilerplate/actions
[github-tag-image]: https://img.shields.io/github/tag/electron-react-boilerplate/electron-react-boilerplate.svg?label=version
[github-tag-url]: https://github.com/lacymorrow/electron-shadcn-boilerplate/releases/latest
[stackoverflow-img]: https://img.shields.io/badge/stackoverflow-electron_react_boilerplate-blue.svg
[stackoverflow-url]: https://stackoverflow.com/questions/tagged/electron-react-boilerplate
# Build app for production
yarn package
```

### Main Process

Imports must be relative (the alias `@` is only available in the renderer process).

#### Order of operations

1. `main/main` is run.

If there is a previous session it will be restored. The directory is scanned again, and new files are added, missing files are marked deleted, and existing files are loaded from cache, checked for:

- Cache expiration;
- Missing tmdb/omdb/trailers metadata
- basic equality checks (file size, last modified date)

If any of the above are true, the file is sent to the queue to fetch updated metadata.

### Renderer Process

You may use the alias `@` to import from the `src` directory.

Entry is `src/renderer/App`, which contains the router. Routing is handled by [react-router](https://reacttraining.com/react-router/web/guides/quick-start). Instead of `<a>` elements, use `<Link to={"/my/path"}>` elements from `react-router-dom`.

To open links in the user's default browser, use the `<ExternalLink>` component from `src/renderer/components/ExternalLink`.
❤️ **Based on [electron-react-boilerplate](https://github.com/electron-react-boilerplate/electron-react-boilerplate/).** ❤️
#### Debugging
https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/demo-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4e1ab97

Please sign in to comment.