You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 23, 2020. It is now read-only.
@@ -10,9 +10,18 @@ Install and completely configure the AWS CLI.
10
10
11
11
Documentation on configuring the AWS CLI can be found [here](http://aws.amazon.com/cli/).
12
12
13
+
If you need an example AWS config file, you can look in `examples/awsconfig`.
14
+
13
15
#### 2)
14
16
15
-
Download Night Uploader and make a place for all of the files in the `templates` directory. Take note of the location.
17
+
Night Uploader needs four directories:
18
+
19
+
- An upload directory.
20
+
- An dump directory.
21
+
- A template directory.
22
+
- And a temporary files directory.
23
+
24
+
Make these and take note of the locations.
16
25
17
26
#### 3)
18
27
@@ -24,16 +33,22 @@ Set the file to permissions of `700`.
24
33
25
34
Open the `night-uploader` file and look at the variables block.
26
35
27
-
Set `location` to the directory where files will be put for pending upload.
36
+
Set `loc` to the directory where files will be put for pending upload.
28
37
29
38
Set `s3bucket` to the name of the S3 bucket you would like Night Uploader to upload to.
30
39
31
-
Set `endLocation` to where the files are moved after the have been uploaded.
40
+
Set `endLoc` to where the files are moved after the have been uploaded.
41
+
42
+
Set `templateLoc` to where the place where you put the template files that came in the `templates` directory of the download (You were told to take a note of it!). This directory must not be located in the `endLocation` or `location` directories and must be accessible to the script.
43
+
44
+
Set `temporaryDirLoc` to where you want Night Uploader to put temporary files it generates.
32
45
33
-
Set `templateLocation` to where the place where you put the template files that came in the `templates` directory of the download (You were told to take a note of it!). This directory must not be located in the `endLocation` or `location` directories and must be accessible to the script.
46
+
Now, you need to upload everything in the `upload/` folder that comes with Night Uploader to your S3 bucket @ `s3://yourbucketname/assets/`. Otherwise, the Index page will not load the required CSS and JS to work.
34
47
35
48
36
-
#### 6) [Optional]
49
+
#### 7) [Optional]
50
+
51
+
##### Pushover
37
52
38
53
Setup [Pushover](https://pushover.net) support for sending of notifications about uploads and statuses.
39
54
@@ -47,27 +62,59 @@ Set `pushoverURL` to the URL you want Pushover to have a link for.
47
62
48
63
Set `pushoverURLTitle` for a title to the URL above.
49
64
50
-
#### 7) [Optional]
65
+
##### Fail Time
66
+
67
+
Set `failTime` to how many seconds you want Night Uploader to wait for a running AWS process to complete.
68
+
69
+
##### Set File Types
51
70
52
-
Add a cronjob in your crontab to run the script one a day at 3am.
71
+
Preset, there are regular expressions to match file extensions. These can be modified to whatever file types you want.
72
+
73
+
*Warning: Editing the audio and video types will mess with the `transcodeMedia` function. Make sure you know what AWS ETC supports when editing.*
74
+
75
+
-`formatVideo`
76
+
-`formatAudio`
77
+
-`formatCode`
78
+
-`formatPDF`
79
+
-`formatImage`
80
+
-`formatArchive`
81
+
82
+
#### 8) Workflows
83
+
84
+
By default, when Night Uploader runs, it runs the workflow ID `1`. To make NightUploader run others, you can run Night Uploader by passing an argument for it (In this case, a workflow ID number). Since Night Uploader comes with two handy workflows, you can run `./nightuploader 1` (or `./nightuploader`) to run the first and `./nightuploader 2` to run the second. You can edit how the workflows run by editing the bottom of the Night Uploader script to your liking.
85
+
86
+
Currently, the following functions work:
87
+
88
+
-`makeNewFilesList`
89
+
-`uploadFiles`
90
+
-`cleanUp`
91
+
-`moveFiles`
92
+
-`transcodeMedia`
93
+
-`makeIndex`
94
+
95
+
#### 9) CronJob
96
+
97
+
Add a cronjob in your crontab to run the script one a day at 3am. Make sure to include a workflow ID if you have a specific one you want it to run.
53
98
54
99
crontab -e
55
100
0 3 * * * /path/to/night-updater
56
101
57
-
#### 8)
102
+
#### 10)
58
103
59
104
Add a test file and let it run over night. Check in the morning to see if it's in S3 and the done folder.
60
105
61
106
# Customization
62
107
63
108
If you want to be able to use your own index theme or HTML, you can! Open up the template files and edit away! Just make sure not to change the file names. Below is how these files are loaded by the script.
64
109
65
-
head
110
+
head.html
66
111
[List Items]
67
-
afterlist
112
+
afterlist.html
68
113
[Number of files]
69
114
[Timestamp]
70
115
[Project info]
71
-
footer
116
+
footer.html
72
117
73
118
Items in brackets `[]` are added by the script and items not in brackets are added directly from that named template file.
119
+
120
+
For an easy color or CSS/JS tweak, you can also edit the `assets/night/*` with whatever you want because it is already loaded on the page.
Copy file name to clipboardExpand all lines: README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Night Uploader
2
2
3
-
*v0.3.1*
3
+
*v0.4*
4
4
5
5
## Features
6
6
@@ -10,6 +10,7 @@
10
10
- Creates an automatic index file that lists everything (minus folders) located in the root of your S3 bucket.
11
11
- Index file is customizable to fit your needs.
12
12
- Checks to see if there is already an instance of AWS running.
13
+
- Automatic use of the ETC (Elastic Transcoder) to render your media into various formats (Follow the `INSTALLATION.md` for setting up the correct pipeline).
13
14
14
15
## Requirements
15
16
@@ -23,3 +24,9 @@
23
24
- Currently running this on my Raspberry Pi to upload files over night so I don't have slow internet during the day or need to leave my computer on over night.
24
25
- I recommend this to be run by a cronjob once a day at 3am. Example in the `INSTALLATION.md`.
25
26
- Recommended file permissions of `700` due to it containing API keys.
27
+
28
+
## Known Issues
29
+
30
+
- You currently need to only use filenames containing no special characters or spaces.
31
+
- Filenames cannot contain a dot except for the extension.
0 commit comments