⌈⌋ ⎇ branch:  freshcode


Check-in [08b1e91919]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updated autoupdate testing descriptions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 08b1e9191917a892ec2a6e6262fcfbfed693114b
User & Date: mario 2014-08-03 01:37:26
Context
2014-08-03
01:39
Split out gravatar email into separate database field `submitter_image`. (In templates still called `submitter_img` however.) check-in: 9e7bb1667b user: mario tags: trunk
01:37
Updated autoupdate testing descriptions. check-in: 08b1e91919 user: mario tags: trunk
2014-08-02
20:55
Introduced "Dr.ChangeLog" for testing autoupdate rulesets (regex,xpath,jquery release notes scraping). check-in: fd4c02c1ab user: mario tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added img/drchangelog.png.

cannot compute difference between binary files

Changes to page_drchangelog.php.

10
11
12
13
14
15
16















17
18
19
20
21
22
23
24
 * actual Autoupdate modules.
 *
 */


$header_add = "<meta name=robots content=noindex>";
include("template/header.php");















?> <section id=main> <?php


// run test
if ($_REQUEST->has("test")) {

    #-- prepare
    $run = new Autoupdate();







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 * actual Autoupdate modules.
 *
 */


$header_add = "<meta name=robots content=noindex>";
include("template/header.php");
?>
<aside id=sidebar>
 <section>
  <h5>Know your audience</h5>
  <small>
  <p> Whatever source you choose for release announcements, try to keep them <b>user-friendly</b>. </p>
  <p> End users aren't fond of commit logs. While "merged pull request XY" might be technically
      highly relevant (for e.g. libraries), it's gibberish to most everyone else.</p>
  <p> So be careful with the <em>GitHub</em> module in particular. If you're not using their
      /release tool, it will pull a commit log. Only basic filtering is applied.</p>
  <p> Likewise write <em>Changelogs</em> as <b>summaries</b>. (That's a bit of a misnomer here,
      they're really NEWS or RELEASE-NOTES files.)</p>
  </small>
 </section>
</aside>
<section id=main> <?php


// run test
if ($_REQUEST->has("test")) {

    #-- prepare
    $run = new Autoupdate();
43
44
45
46
47
48
49


50
51
52
53
54

55
56

57
58
59
60
61
62
63
64
}


// display form
else {

   $data = $_REQUEST->list->html["name,autoupdate_module,autoupdate_url,autoupdate_regex"];


   $select = "form_select_options";
   print<<<FORM
   
   <h3>Dr. Changelog</h3> 
   <form action=drchangelog method=POST>

        <p>
           Freshcode.club can be automated to track your software releases. There are various

           alternatives for uncovering them. You can try them out here.

           <label>
               Retrieval method
               <select name=autoupdate_module>
                   {$select("release.json,changelog,regex,github", $data["autoupdate_module"])}
               </select>
           </label>







>
>





>

|
>
|







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
}


// display form
else {

   $data = $_REQUEST->list->html["name,autoupdate_module,autoupdate_url,autoupdate_regex"];
   $data["autoupdate_regex"] or $data["autoupdate_regex"] = "\n\nversion = /Version ([\d.]+)/\n\nchanges = http://example.org/news.html\nchanges = $('article pre#release')\nchanges = ~ ((add|fix|change) \V+) ~mix*";

   $select = "form_select_options";
   print<<<FORM
   
   <h3>Dr. Changelog</h3> 
   <form action=drchangelog method=POST>
        <img src=img/drchangelog.png align=right alt="birdy big eyes" title="Don't ask me, I'm just a pictogram.">
        <p>
           Freshcode.club can be automated to track your software releases. There are
           <a href="http://fossil.include-once.org/freshcode/wiki/Autoupdate">various
           alternatives for</a> uncovering them. You can try them out here.

           <label>
               Retrieval method
               <select name=autoupdate_module>
                   {$select("release.json,changelog,regex,github", $data["autoupdate_module"])}
               </select>
           </label>
78
79
80
81
82
83
84
85
86
87
88
89
90





91
92
93
94
95



96


97
98
99
100
101
102
103
104
105
106
107
108
109
110

        </p>
        <p>
           <label>
               Autoupdate URL
               <input name=autoupdate_url type=url size=80 value="$data[autoupdate_url]" placeholder="https://github.com/user/repo/tags.atom" maxlength=250>
           </label>
           Add the URL to your changelog, releases.json or github project here. For the regex method
           this will also be the first page to be extracted from.
        </p>

        <p>
           <h4>Regex</h4>





           <label>
               Extraction Rules (URLs, Regex, Xpath)
               <textarea cols=70 rows=10 name=autoupdate_regex placeholder="version = /-(\d+\.\d+\.\d+)\.txz/" maxlength=2500>$data[autoupdate_regex]</textarea>
               <small>
               <a href="http://fossil.include-once.org/freshcode/wiki/AutoupdateRegex">Regex automated updates</a>



               expect a list of <code>field=/regex/</code> names, like version=, changes=, download=, state=.


               Associatively-named "Other URLs" are also used for extraction.</small>
           </label>
        </p>
        <p>
          <input type=submit name=test value=Test-Run>
        </p>
   </form>
FORM;
}


include("template/bottom.php");

?>







|





>
>
>
>
>

|
|

<
>
>
>
|
>
>
|













97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

        </p>
        <p>
           <label>
               Autoupdate URL
               <input name=autoupdate_url type=url size=80 value="$data[autoupdate_url]" placeholder="https://github.com/user/repo/tags.atom" maxlength=250>
           </label>
           Add the URL to your Changelog, releases.json, or GitHub project here. For the regex method
           this will also be the first page to be extracted from.
        </p>

        <p>
           <h4>Regex</h4>
           Screen scraping your own project website is often quite as simple. Define a list for at
           least <code>version = ...</code> and <code>changes = ...</code> - You can assign new URLs
           for each, and in the following rules mix any
           <a href="http://fossil.include-once.org/freshcode/wiki/AutoupdateRegex">→
           RegExp, XPath, or jQuerish</a> selectors.
           <label>
               Extraction Rules <em>(URLs, Regex, Xpath, jQuery)</em>
               <textarea cols=67 rows=10 name=autoupdate_regex placeholder="version = /-(\d+\.\d+\.\d+)\.txz/" maxlength=2500>$data[autoupdate_regex]</textarea>
               <small>

               <li>Assigning new URLs is only necessary when there's different data to extract from.</li>
               <li>RegExps like <code>version = /Changes for ([\d.]+)/</code> often match headlines well.</li>
               <li>A common XPath rule for extracting the first bullet point list is <code>changes = (//ul)[1]/li</code>.</li>
               <li>While <code>changes = $("section#main article .release")</code> narrows it down
                   for HTML pages.</li>
               <li>You often can mix extractors, first an XPath/jQuery expression, then a RegExp.</li>
               </small>
           </label>
        </p>
        <p>
          <input type=submit name=test value=Test-Run>
        </p>
   </form>
FORM;
}


include("template/bottom.php");

?>

Changes to template/submit_form.php.

150
151
152
153
154
155
156
157
158

159
160

161
162
163
164
165
166
167
168
169
170
171
172
173

174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
           </label>
        </p>


        <h3>Automatic Release Tracking</h3>
        <p>
           <em>You can skip this section.</em>
           But after registering your first version manually, you can later automate the process.
           Use a normalized Changelog or <var>releases.json</var> in your version control system,

           or a regex for your project homepage.
           See the <a href="http://fossil.include-once.org/freshcode/wiki/Autoupdate">Autoupdate Howto</a>.

        </p>
        <p>
           <label>
               Via
               <select name=autoupdate_module>
                   {$select("none,release.json,changelog,regex,github,sourceforge", $data["autoupdate_module"])}
               </select>
           </label>

           <label>
               Autoupdate URL
               <input name=autoupdate_url type=url size=50 value="$data[autoupdate_url]" placeholder="https://github.com/user/repo/tags.atom" maxlength=250>
               <small>This is the primary source for <b>releases.json</b> and the <b>regex</b> method.

               GitHub and Sourceforge URLs are autodiscovered if they're e.g. your project homepage.</small>
           </label>

           <label>
               Regex
               <textarea cols=50 rows=3 name=autoupdate_regex placeholder="version = /-(\d+\.\d+\.\d+)\.txz/" maxlength=2500>$data[autoupdate_regex]</textarea>
               <small>
               <a href="http://fossil.include-once.org/freshcode/wiki/AutoupdateRegex">Regex automated updates</a>
               expect a list of <code>field=/regex/</code> names, like version=, changes=, download=, state=.
               Associatively-named "Other URLs" are also used for extraction.</small>
           </label>

        </p>

        <h3>Publish</h3>
        <p>
           Please proofread again before saving.







|
|
>
|
|
>











|
|
>
|



|
|

|
|
|







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
           </label>
        </p>


        <h3>Automatic Release Tracking</h3>
        <p>
           <em>You can skip this section.</em>
           But future release submissions can be automated, with  a
           normalized Changelog, or <var>releases.json</var>, or an extraction ruleset
           <a href=/drchangelog><img src=img/drchangelog.png width=37 height=37 align=right style="padding:5pt"></a>
           for your version control system or project homepage.
           See the <a href="http://fossil.include-once.org/freshcode/wiki/Autoupdate">Autoupdate Howto</a>
           or <a href=/drchangelog>Dr.Changelog</a>.
        </p>
        <p>
           <label>
               Via
               <select name=autoupdate_module>
                   {$select("none,release.json,changelog,regex,github,sourceforge", $data["autoupdate_module"])}
               </select>
           </label>

           <label>
               Autoupdate URL
               <input name=autoupdate_url type=url size=50 value="$data[autoupdate_url]" placeholder="https://github.com/user/repo/Changelog.md" maxlength=250>
               <small>This is the primary source for <b>releases.json</b> or a <b>Changelog</b>.
               It's also initially used for <b>Regex</b> rules in absence of override URLs. GitHub and SourceForge
               links are usually autodiscovered.</small>
           </label>

           <label>
               Rules <span style="font-weight: 100">(URLs, Regex, XPath, jQuery)</span>
               <textarea cols=50 rows=3 name=autoupdate_regex placeholder="version = /foo-(\d+\.\d+\.\d+)\.txz/" maxlength=2500>$data[autoupdate_regex]</textarea>
               <small>
               <a href="http://fossil.include-once.org/freshcode/wiki/AutoupdateRegex">Regex/Xpath automated updates</a>
               expect a list of <code>field = ..</code> rules. Define an URL and then associated RegExp, XPath or jQuery selectors
               for the version= and changes= fields, and optionally for state=, scope= and download=.</small>
           </label>

        </p>

        <h3>Publish</h3>
        <p>
           Please proofread again before saving.