Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

16 commits

Auteur SHA1 Message Date
PantsuDev
d9142a73c3 Fix most go lint warnings 2017-07-23 15:50:18 +10:00
akuma06
5376b9e271 New config files (#854)
* New config files

As decided, config files are parsed at runtime.
I decided to go for YAML config files because there can be comments in
it.
There are 2 files:
* config/default_config.yml <= which shouldn't be edited unless we add a
config parameter
* config/config.yml <= which is the user-defined config. This file
shouldn't be commited

Changed every call to config.XXX to config.Conf.XXX (look to the new
stucture of config in config/types.go)

Of course, putting config parameters in config.yml overrides config in
config_default.yml. You don't have to put everything in it, just add
what you want to override.

* Fixing test

Replacing conf.New by config.Conf

* Fixing call to config.Conf to config.Config{} in test files

* Might have fixed testing with this

Printf instead of Fatalf

* Renaming config.yml in example file

* Forbid commiting config.yml

* Should be now fixed

* Do not need this file anymore
2017-05-30 21:21:57 -05:00
ripdog
aae25274c1 Add a route for the user settings form: /edit,called UserDetailsHandler 2017-05-11 01:09:36 +12:00
Jeff Becker
73f77f1624 properly handle os.Interrupt Signal
This makes systemd not put unit into fail mode when stopping

INFO:

* make sure to use signals.RegisterCloser for everything that should be closed on interrupt

* for any net.Listeners created make sure to wrap them with network.WrapListener and register with signals.RegisterCloser
2017-05-10 08:23:29 -04:00
tomleb
55c7252327 Automate postgresql setup
Creates the user and the database provided by the environment variable.
These are currently duplicated in postgres.env so we might want to find
a way to have them in only one place.

I tried my best at keeping the pg_hba.conf file secure for the server,
but I am no expert so it'd be great if someone could check it out.
2017-05-08 23:42:04 -04:00
Atvaark
b451cb2216 Ignore .idea folder (IntelliJ)
This folder contains project specific settings for IntelliJ
based IDEs like Gogland.
2017-05-07 20:33:10 +02:00
akuma06
7ffde7a8e1 Merge branch 'master' into master 2017-05-07 02:44:49 +02:00
akuma06
f88b4656a1 Fixed Typo + Added multi language support
Multi language for User package
2017-05-07 02:32:32 +02:00
tomleb
dcccb7ee1b Remove categories and subcategories queries
This commit removes usage of Categories queries in order to support
postgres. The Categories in postgres is an enum instead of a table and
we don't need to use the table in sqlite because the value are hardcoded
in the html and are unlikely to ever change.

This commit breaks the thumbnails in the index. Other functionality
needs to be tested before merging.
2017-05-06 19:02:02 -04:00
tomleb
125a53263b Run sqlite environment in docker 2017-05-06 18:48:21 -04:00
akuma06
a43d74e6c9 Update .gitignore 2017-05-07 00:43:08 +02:00
bakape
a16caa0556 Port _search.html to quicktemplate 2017-05-07 00:21:16 +03:00
Eliot Whalan
6adce8eda9 Run go fmt and add swap files to gitignore 2017-05-05 14:07:45 +10:00
bakape
17a62c8ed2 Script for binary package cross-compilation 2017-05-05 03:41:47 +03:00
akuma06
11b22c82dd Rearranged static Files and add number of item per page
No CSS and Javascript in the index.html, more easy to maintain the design and the code.
Added a select for the number of item to show and added the new parameter to the SQL query.
Total number of item determined by the SQL query and not fixed.
2017-05-03 19:45:18 +02:00
Eliot Whalan
17b1917f0b initial version 2017-05-02 20:39:53 +10:00