소스 검색

Added read-it-later functionality from Wallabag

Justin Plock 10 년 전
부모
커밋
d1073d042d
No account linked to committer's email address

+ 1
- 0
README.textile 파일 보기

@@ -50,6 +50,7 @@ What do you get if you point this thing at a VPS? All kinds of good stuff!
50 50
 * "RFC6238":http://tools.ietf.org/html/rfc6238 two-factor authentication compatible with "Google Authenticator":http://en.wikipedia.org/wiki/Google_Authenticator and various hardware tokens
51 51
 * Nightly backups to "Tarsnap":https://www.tarsnap.com/.
52 52
 * Git hosting via "cgit":http://git.zx2c4.com/cgit/about/ and "gitolite":https://github.com/sitaramc/gitolite.
53
+* Read-it-later via "Wallabag":https://www.wallabag.org/
53 54
 * A bunch of nice-to-have tools like "mosh":http://mosh.mit.edu and "htop":http://htop.sourceforge.net that make life with a server a little easier.
54 55
 
55 56
 No setup is perfect, but the general idea is to provide a bunch of useful services while being reasonably secure and low-maintenance. Set it up, SSH in every couple weeks, but mostly forget about it.

+ 6
- 0
roles/readlater/handlers/main.yml 파일 보기

@@ -0,0 +1,6 @@
1
+- name: import wallabag sql
2
+  shell: PGPASSWORD='{{ wallabag_db_password }}' psql -h localhost -d {{ wallabag_db_database }} -U {{ wallabag_db_username }} -f /var/www/wallabag/install/postgres.sql --set ON_ERROR_STOP=1
3
+  notify: remove install folder
4
+
5
+- name: remove install folder
6
+  file: path=/var/www/wallabag/install state=absent

+ 8
- 1
roles/readlater/tasks/wallabag.yml 파일 보기

@@ -27,6 +27,7 @@
27 27
                  name={{ wallabag_db_database }}
28 28
                  state=present
29 29
                  owner={{ wallabag_db_username }}
30
+  notify: import wallabag sql
30 31
 
31 32
 - name: Build Composer
32 33
   shell: curl -sS https://getcomposer.org/installer | php
@@ -45,11 +46,17 @@
45 46
         recurse=yes
46 47
         state=directory
47 48
 
49
+- name: Create the configuration file
50
+  template: src=var_www_wallabag_inc_poche_config.inc.php.j2
51
+            dest=/var/www/wallabag/inc/poche/config.inc.php
52
+            owner=www-data
53
+            group=www-data
54
+
48 55
 - name: Configure the Apache HTTP server for wallabag
49 56
   template: src=etc_apache2_sites-available_wallabag.j2
50 57
             dest=/etc/apache2/sites-available/wallabag
51
-            group=www-data
52 58
             owner=www-data
59
+            group=www-data
53 60
   notify: restart apache
54 61
 
55 62
 - name: Enable the wallabag site

+ 58
- 0
roles/readlater/templates/var_www_wallabag_inc_poche_config.inc.php.j2 파일 보기

@@ -0,0 +1,58 @@
1
+<?php
2
+/**
3
+ * wallabag, self hostable application allowing you to not miss any content anymore
4
+ *
5
+ * @category   wallabag
6
+ * @author     Nicolas Lœuillet <nicolas@loeuillet.org>
7
+ * @copyright  2013
8
+ * @license    http://www.wtfpl.net/ see COPYING file
9
+ */
10
+
11
+define ('SALT', '{{ wallabag_salt }}'); # put a strong string here
12
+define ('LANG', 'en_EN.utf8');
13
+
14
+define ('STORAGE', 'postgres'); # postgres, mysql or sqlite
15
+
16
+define ('STORAGE_SQLITE', ROOT . '/db/poche.sqlite'); # if you are using sqlite, where the database file is located
17
+
18
+# only for postgres & mysql
19
+define ('STORAGE_SERVER', 'localhost');
20
+define ('STORAGE_DB', '{{ wallabag_db_database }}');
21
+define ('STORAGE_USER', '{{ wallabag_db_username }}');
22
+define ('STORAGE_PASSWORD', '{{ wallabag_db_password }}');
23
+
24
+#################################################################################
25
+# Do not trespass unless you know what you are doing
26
+#################################################################################
27
+
28
+// Change this if not using the standart port for SSL - i.e you server is behind sslh
29
+define ('SSL_PORT', 443);
30
+
31
+define ('MODE_DEMO', FALSE);
32
+define ('DEBUG_POCHE', FALSE);
33
+define ('DOWNLOAD_PICTURES', FALSE);
34
+define ('CONVERT_LINKS_FOOTNOTES', FALSE);
35
+define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
36
+define ('SHARE_TWITTER', TRUE);
37
+define ('SHARE_MAIL', TRUE);
38
+define ('SHARE_SHAARLI', FALSE);
39
+define ('SHAARLI_URL', 'http://myshaarliurl.com');
40
+define ('FLATTR', TRUE);
41
+define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url=');
42
+define ('NOT_FLATTRABLE', '0');
43
+define ('FLATTRABLE', '1');
44
+define ('FLATTRED', '2');
45
+define ('ABS_PATH', 'assets/');
46
+
47
+define ('DEFAULT_THEME', 'baggy');
48
+
49
+define ('THEME', ROOT . '/themes');
50
+define ('LOCALE', ROOT . '/locale');
51
+define ('CACHE', ROOT . '/cache');
52
+
53
+define ('PAGINATION', '10');
54
+
55
+//limit for download of articles during import
56
+define ('IMPORT_LIMIT', 5);
57
+//delay between downloads (in sec)
58
+define ('IMPORT_DELAY', 5);

+ 1
- 1
vars/defaults.yml 파일 보기

@@ -108,8 +108,8 @@ gitolite_version: 3.5.3.1
108 108
 
109 109
 # wallabag
110 110
 wallabag_version: 1.6.1b
111
-# wallabag_salt: (required)
112 111
 wallabag_domain: "read.{{ domain }}"
112
+# wallabag_salt: (required)
113 113
 wallabag_db_username: wallabag
114 114
 # wallabag_db_password: (required)
115 115
 wallabag_db_database: wallabag

+ 4
- 0
vars/user.yml 파일 보기

@@ -80,3 +80,7 @@ selfoss_db_password: "TODO"
80 80
 selfoss_username: "{{ main_user_name }}"
81 81
 # this is the sha512 hash of the desired password
82 82
 selfoss_password_hash: "TODO"
83
+
84
+# wallabag
85
+wallabag_salt: TODO
86
+wallabag_db_password: TODO

Loading…
취소
저장