olddoc user/dev discussion/patches/bugs/etc
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] olddoc 1.9.0 - old-fashioned RDoc generator
@ 2020-08-10 21:56  6% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-08-10 21:56 UTC (permalink / raw)
  To: olddoc-public

olddoc contains old-fashioned document generators for those who do not
wish to impose bloated, new-fangled web cruft on their readers.

olddoc contains dark216, a HTML generator without any images, frames,
or JavaScript.  It is designed for users of text-based browsers
and/or low-bandwidth connections; yet respects user preference for
light color schemes in new CSS browsers while favoring darkness for
power savings on OLED and CRT displays.  dark216 focuses on text as
it is the lowest common denominator for accessibility and compatibility
with people and hardware.

Changes since v1.8.0:

      allow multiple rdoc_url and cgit_url values
      add imap_url support

* https://80x24.org/olddoc/ - homepage + sample

* license: GPL-3.0+
* git clone https://80x24.org/olddoc.git

* olddoc-public@80x24.org - no subscription, no HTML

public mail archives

* https://80x24.org/olddoc-public/
* http://ou63pmih66umazou.onion/olddoc-public/
* imaps://news.public-inbox.org/inbox.comp.lang.ruby.olddoc.0
* imap://ou63pmih66umazou.onion/inbox.comp.lang.ruby.olddoc.0
* nntps://news.public-inbox.org/inbox.comp.lang.ruby.olddoc
* nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.olddoc

.onion URLs require Tor <https://www.torproject.org/>

^ permalink raw reply	[relevance 6%]

* [PATCH] allow multiple rdoc_url and cgit_url values
@ 2020-07-26  2:15  7% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-07-26  2:15 UTC (permalink / raw)
  To: olddoc-public

Might as well, since domain name ownership is a shaky thing
and ICANN may try to screw the world over once again.
---
 lib/olddoc/history.rb   |  2 +-
 lib/olddoc/news_atom.rb |  4 ++--
 lib/olddoc/prepare.rb   |  4 ++--
 lib/oldweb.rb           | 20 ++++++++++----------
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/lib/olddoc/history.rb b/lib/olddoc/history.rb
index dcdf0fe..800446e 100644
--- a/lib/olddoc/history.rb
+++ b/lib/olddoc/history.rb
@@ -9,7 +9,7 @@ module Olddoc::History # :nodoc:
 
   # returns a cgit URI for a given +tag_name+
   def tag_uri(tag_name)
-    uri = @cgit_uri.dup
+    uri = @cgit_uri[0].dup
     uri.path += "/tag/"
     uri.query = "id=#{tag_name}"
     uri
diff --git a/lib/olddoc/news_atom.rb b/lib/olddoc/news_atom.rb
index ed01197..39f9bb8 100644
--- a/lib/olddoc/news_atom.rb
+++ b/lib/olddoc/news_atom.rb
@@ -32,9 +32,9 @@ module Olddoc::NewsAtom # :nodoc:
   def news_atom_xml
     project_name, short_desc, _ = readme_metadata
     new_tags = tags[0,10]
-    atom_uri = @rdoc_uri.dup
+    atom_uri = @rdoc_uri[0].dup
     atom_uri.path += "NEWS.atom.xml"
-    news_uri = @rdoc_uri.dup
+    news_uri = @rdoc_uri[0].dup
     news_uri.path += "NEWS.html"
 
     dst = ''
diff --git a/lib/olddoc/prepare.rb b/lib/olddoc/prepare.rb
index f902fff..f0e6329 100644
--- a/lib/olddoc/prepare.rb
+++ b/lib/olddoc/prepare.rb
@@ -12,8 +12,8 @@ class Olddoc::Prepare # :nodoc:
     cgit_url = opts['cgit_url']
     rdoc_url && cgit_url or
       abort "rdoc_url and cgit_url required in .olddoc.yml for `prepare'"
-    @rdoc_uri = URI.parse(rdoc_url)
-    @cgit_uri = URI.parse(cgit_url)
+    @rdoc_uri = Array(rdoc_url).map { |u| URI.parse(u) }
+    @cgit_uri = Array(cgit_url).map { |u| URI.parse(u) }
     @name, @short_desc = readme_metadata
   end
 
diff --git a/lib/oldweb.rb b/lib/oldweb.rb
index 74b4db1..3b2b2f2 100644
--- a/lib/oldweb.rb
+++ b/lib/oldweb.rb
@@ -73,23 +73,23 @@ class Oldweb
     noindex = @old_cfg['noindex'] and noindex.each { |k| ni[k] = true }
     @old_cfg['noindex'] = ni
 
-    cgit_url = @old_cfg['cgit_url']
+    cgit_url = Array(@old_cfg['cgit_url'])
     source = @old_cfg['source_code'] ||= []
     if source.empty?
-      if cgit_url
-        source << "git clone #{cgit_url}"
-      end
+      source << "git clone #{cgit_url[0]}" if cgit_url[0]
       git_url = @old_cfg['git_url']
-      if git_url && git_url != cgit_url
+      if git_url && git_url != cgit_url[0]
         source << "git clone #{git_url}"
       end
     end
 
-    if cgit_url
-      cgit_url += '/tree/%s' # path name
-      tag = @git_tag and cgit_url << "id=#{CGI.escape(tag)}"
-      cgit_url << '#n%d' # lineno
-      @old_vcs_url = cgit_url
+    if cgit_url[0]
+      cgit_url.each do |u|
+        u += '/tree/%s' # path name
+        tag = @git_tag and u << "id=#{CGI.escape(tag)}"
+        u << '#n%d' # lineno
+      end
+      @old_vcs_url = cgit_url[0]
     end
     @oldweb_style = nil # used by dark216
   end

^ permalink raw reply related	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-07-26  2:15  7% [PATCH] allow multiple rdoc_url and cgit_url values Eric Wong
2020-08-10 21:56  6% [ANN] olddoc 1.9.0 - old-fashioned RDoc generator Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/olddoc.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).