10 Commits 2080b9638d ... 4e951840db

Author SHA1 Message Date
  Oliver Galvin 4e951840db tidy devnotes, add more detail and rename 6 years ago
  Oliver Galvin 1af359b02e tidy devnotes, add more detail and rename 6 years ago
  Oliver Galvin 137f25acf7 minor corrections and tidy README, remove reference to man page markdown 6 years ago
  Oliver Galvin af36e99a9a tidy automake options, quiet output 6 years ago
  Oliver Galvin 9d603e0897 improve autogen and rename to bootstrap 6 years ago
  Oliver Galvin 8d78c6c025 minor spacing fixes 6 years ago
  Oliver Galvin d50d51dafa tidy and add uncrustify rule 6 years ago
  Oliver Galvin b92b8f5e01 tidy/typo 6 years ago
  Oliver Galvin b20e22d06a we have an icon 6 years ago
  Oliver Galvin f613c1eaf4 use subdirectory gitignores 6 years ago
10 changed files with 112 additions and 98 deletions
  1. 13 30
      .gitignore
  2. 11 12
      README.md
  3. 4 4
      TODO
  4. 0 29
      autogen.sh
  5. 38 0
      bootstrap
  6. 2 1
      configure.ac
  7. 38 0
      docs/CODING.md
  8. 0 22
      docs/devnotes
  9. 6 0
      gtk/.gitignore
  10. 0 0
      gtk/makefile.am

+ 13 - 30
.gitignore

@@ -2,60 +2,43 @@
 
 # generated files
 README
-/*.tar.*
-testing/*.dump
-
-# objects/libraries
-*.[oa]
-*.so
-*.dll
-*.exe
-*.dylib
-src/tubeman
-gtk/tubeman-gtk
+*.tar.*
+*.dh-orig
+*.uncrustify
+debian/
 
 # configure
-/configure
-/config.*
-[Mm]akefile
-*.in
+config.*
+[Mm]akefile*
+!*.a[mc]
 
 # autotools
+autom4te.cache/
 m4/
 .deps
-/autom4te.cache
+/ABOUT-NLS
 /autoscan*.log
-/configure.scan
 /compile
+/configure*
 /depcomp
 /INSTALL
 /install-sh
 /missing
 
-# gettext
-/ABOUT-NLS
-po/*quot.header
-po/*.sed
-po/*.sin
-po/Makevars.template
-po/Rules-quot
-
 # Linux
 *~
 .Trash-*
-*.dh-orig
-debian/
 
 # macOS
-.DS_Store
 ._*
+.DS_Store
 .Spotlight-V100
 .TemporaryItems
 .Trashes
 Temporary Items
 
 # Windows
-Thumbs.db
-[Dd]esktop.ini
 $RECYCLE.BIN/
+[Dd]esktop.ini
+Thumbs.db
 *.lnk

+ 11 - 12
README.md

@@ -19,8 +19,8 @@ A lightweight YouTube subscription manager and browser, with a
 [pacman](https://archlinux.org/pacman)-style interface. 
 Follow Youtube channels without needing the Youtube API, a Google account, 
 running [nonfree Javascript](https://gnu.org/philosophy/javascript-trap.html) 
-or a bloated web interface. Stores subscriptions in a local SQLite database, 
-is configurable, and includes an optional ncurses based interactive mode.
+or a bloated web interface. Stores subscriptions in a local database, is 
+configurable, and includes an optional curses based interface and GUI.
 
 ## Goals
 
@@ -44,9 +44,9 @@ By storing a subscription database locally (which can be backed up however you
 wish), you avoid needing a Google account, for increased privacy and not 
 having to trust Google with your data and letting them build a profile of your 
 interests. It also avoids the need for using their website and any proprietary 
-Javascript or Flash code, instead using a familiar and simpler native command 
-line or graphical interface, free formats like WebM, VP9 video and Ogg audio, 
-and free software players like mpv or VLC.
+Javascript or Flash, instead using a familiar and simpler native command line 
+or graphical interface, free formats like WebM, VP9 video and Ogg audio, and 
+free software players like mpv or VLC.
 
 TubeMan looks for the configuration file in the following places, 
 from first to last:
@@ -61,17 +61,16 @@ When run, TubeMan will generate a subscription database if one is not found.
 Optionally, you can import your existing database from an Android device 
 running NewPipe.  
 
-See `tubeman --help` or `man tubeman` for usage information, or look at 
-[docs/tubeman.1.md](docs/tubeman.1.md) in the source.  
+See `tubeman --help` or `man tubeman` for usage information.  
 See the default config file for descriptions of the config options.  
 Running TubeMan with no options starts interactive mode.
 
 You can import your supscriptions from youtube.com by downloading an OPML file 
 from Youtube by visiting 
 <https://youtube.com/subscription_manager?action_takeout=1> 
-while signed in, then import it with the `--import` option. 
-You can add channels individually, the OPML file is an **optional** way to add 
-your subscriptions. See the man page for more details.  
+while signed in, then import it with the `--import` option. You can add 
+channels individually, the OPML file is an **optional** way to add your 
+subscriptions. See the man page for more details.  
 
 ### Displaying Thumbnails
 
@@ -159,7 +158,7 @@ from the Noun Project, released under the
 
 ### Prior Art
 
-TubeMan doesn't use code from these projects, but were used as inspiration.
+No code is used from these projects, but they inspired certain features.
 
 * [NewPipe](https://github.com/TeamNewPipe/NewPipe) - a Youtube app for 
  Android that does not use the Youtube API and can store local subscriptions
@@ -172,7 +171,7 @@ TubeMan doesn't use code from these projects, but were used as inspiration.
 
 ### Author
 
-Copyright Oliver Galvin, 2017-2018  
+Copyright (C) Oliver Galvin, 2017-2018  
 TubeMan is free software, released under the terms of the GNU 
 [General Public License](https://www.gnu.org/copyleft/gpl.html),  
 either version 3 of the License, or any later version. 

+ 4 - 4
TODO

@@ -1,13 +1,14 @@
 To do:
-install the library, use config in pkgdatadir instead
 
 tidying up -
 improve itag selection
 improve option parsing (optparse, help/S/Q)
 
 functionality -
-import newpipe/termtube database
-finish json parsing - get latest video id in updvidlist, allow /user/ url in addchannel
+install the library, use config in pkgdatadir instead
+import newpipe/tubeman database
+finish json parsing - get latest video id in updvidlist
+allow /user/ url in addchannel
 search video lists
 search channels/videos on youtube
 
@@ -23,7 +24,6 @@ other -
 daemon mode
 service files
 info page
-icon
 editorconfig, gitlab-ci, uncrustify
 support peertube
 other possible alternatives: dtube, bitchute, archive.org, mediagoblin

+ 0 - 29
autogen.sh

@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# This script copies over any necessary autotools files that are missing
-# To run this you need autoconf, autoconf-archive, automake, autopoint, pkgconf
-
-prog=tubeman
-echo "$0: Initialising $prog source directory"
-
-if ! test -f configure.ac ||
-   ! test -f makefile.am  ||
-   ! test -d src          ||
-   ! test -f src/"$prog".c; then
-	echo "Cannot run from outside the root of the $prog repository!"
-	echo "Change to the directory where $0 is found, and try again."
-	exit 1
-fi
-
-for dep in automake autoconf autopoint; do
-	if ! $dep --version > /dev/null 2>&1; then
-		echo "Error: $dep missing!"
-		exit 1
-	fi
-done
-
-echo " Generating configure script and other necessary files for ${prog}..."
-autopoint
-aclocal
-autoconf -f
-automake -acf

+ 38 - 0
bootstrap

@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# This script bootstraps autotools: it copies any necessary files,
+# and generates the configure script, when checked out from git
+# Copyright (C) Oliver Galvin 2018
+# See COPYING for license information
+
+set -euo pipefail #Strict shell mode
+
+#Check for dependencies
+deps="automake autoconf autopoint pkgconf"
+for dep in $deps; do
+	$dep --version >/dev/null 2>&1 || (
+		echo "Error: $dep is missing. Aborting."
+		exit 1
+	)
+done
+
+#Make sure we are in the same directory as the script
+srcdir=$(dirname "$0")
+cd "$srcdir" || exit 1
+
+#Check the directory has the necessary template files
+if ! test -f configure.ac || ! test -f makefile.am; then
+	echo "Directory $srcdir does not look like a project root. Aborting."
+	exit 1
+fi
+
+#shellcheck disable=SC2016
+prog=$(autoconf -t 'AC_INIT:$1')
+echo "$0: Bootstrapping $prog source directory..."
+
+autopoint || exit 1
+aclocal || exit 1
+autoreconf -fi || exit 1
+
+echo "...done. $prog can now be built and installed."
+test -f INSTALL && echo "See the INSTALL file."

+ 2 - 1
configure.ac

@@ -4,7 +4,8 @@
 AC_PREREQ([2.69])
 AC_INIT([TubeMan], [0.1], [odg@riseup.net], ,
         [https://notabug.org/odg/tubeman])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects -Wall std-options])
+AM_SILENT_RULES([yes])
 AC_CONFIG_SRCDIR([src/tubeman.c])
 AX_CHECK_ENABLE_DEBUG([no])
 

+ 38 - 0
docs/CODING.md

@@ -0,0 +1,38 @@
+# TubeMan
+
+## Notes relevent to developers only
+ 
+Long description is used in man page, debian package and about window
+Short description is used in man page name, help text
+
+### Testing
+
+ * Testing scripts in /testing
+ * When compiling, warning messages are turned up to max
+ * CC=testing/gcc-strict can be used for even more warnings
+ * Aim to be able to build with no warnings from the compiler or cppcheck
+
+### Style
+
+A brief set of style guidelines - to be enforced with uncrustify
+
+ * K&R style
+  * Braces start on the same line for if/else/for/do/while blocks
+  * Function braces start on the line after the header on the same indent level
+  * Ending braces on a new line
+ * Use braces around every if/else/for/do/while block, even single statements
+ * Use tabs to indent, spaces to align columns
+ * Maximum 80 characters per line
+ * No goto statements or multiple statements on one line
+ * No global variables, and keep variables to least possible scope
+
+### Portability
+
+ * Use standard ISO C89 for tubeman, C99 for tubeman-gtk
+ * Keep any platform specific code to a minimum
+ * POSIX-specific code should have a WIN32 alternative
+ * No GNU extensions, for macOS/BSD compatibility
+
+### Internationalisation:
+
+Using gettext, enclose any strings in _(), as suggested in gettext docs

+ 0 - 22
docs/devnotes

@@ -1,22 +0,0 @@
-Miscellaneous notes relevent to developers only
----
- 
-Documentation:
-README is generated from README.md by pandoc
-man page is generated from docs/tubeman.1.md by pandoc
- pandoc -s -f markdown -t man tubeman.1.md > tubeman.1
-and for the readme
- sed -E -e 's/\(.*\)//g' -e 's/(\[|\]|\*|`)//g' README.md
-
-Testing scripts in /testing.
-When compiling I have warning messages turned up to max -
- -Wall -Werror -Wpedantic -std=c89
-C89 used with pedantic to get the most warnings and to be as portable as possible.
-I aim to be able to build with no warnings.
-
-Portability:
-Any POSIX-specific code should have a WIN32 alternative
-No GNU extensions, for macOS/BSD compatibility
-
-Internationalisation:
-Using gettext, enclose any strings in _(), as suggested in gettext docs

+ 6 - 0
gtk/.gitignore

@@ -0,0 +1,6 @@
+## TubeMan .gitignore file
+
+# objects/libraries
+*.[oa]
+*.exe
+tubeman-gtk

+ 0 - 0
gtk/makefile.am


Some files were not shown because too many files changed in this diff