Check-in [ff62f0fbb1]

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

Overview
Comment:Update script to do the GitHub conversion possibly better.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wip-userguide
Files: files | file ages | folders
SHA1:ff62f0fbb1a0e0ceb51040e08ab47f6d78cd6280
User & Date: stephanie.gawroriski 2020-07-28 14:32:18
Context
2020-07-28
14:39
Correct links and properly cleanup. check-in: acbfef5bfb user: stephanie.gawroriski tags: wip-userguide
14:32
Update script to do the GitHub conversion possibly better. check-in: ff62f0fbb1 user: stephanie.gawroriski tags: wip-userguide
13:44
Correct sidebar. check-in: 69569f88eb user: stephanie.gawroriski tags: wip-userguide
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to .circleci/squirreljme-wikify-user-guide.sh.

3
4
5
6
7
8
9
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
40

41
42
43


44
45
46
47
48
49
50
51
52
53
54

55
56
57


58
# Multi-Phasic Applications: SquirrelJME
#     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
#     Copyright (C) Multi-Phasic Applications <multiphasicapps.net>
# ---------------------------------------------------------------------------
# SquirrelJME is under the GNU General Public License v3+, or later.
# See license.mkd for licensing and copyright information.
# ---------------------------------------------------------------------------
# DESCRIPTION: Wikifies SquirrelJME


# Must be valid!
if [ "$#" -lt "2" ]
then
	echo "Usage: $0 [repo] [wiki-git-repo]"
	exit 1
fi

# These are directories
__repo="$1/assets/user-guide"
__wiki="$2"

# These both must be directories
if [ ! -d "$__repo" ] || [ ! -d "$__wiki" ]
then
	echo "Both arguments must be directories."
	exit 1
fi

# Target must be a Git repo
if [ ! -d "$__wiki/.git" ]
then
	echo "Target not a Git repository."
	exit 1
fi






















# Remove any files which are missing
find "$__wiki" -type f | while read __wikiFile

do
	__baseName="$(basename "$__wikiFile")"

	
	# File is missing, remove it
	if [ ! -f "$__repo/$__baseName" ]


	then
		echo "Removing file $___baseName..."
		
		git rm -f "$__wikiFile"
	fi
done

# Copy and add any files over
find "$__repo" -type f | while read __repoFile
do
	__baseName="$(basename "$__repoFile")"

	
	cp -vf "$__repoFile" "$__wiki/$__baseName"
	(cd "$__wiki" && git add "$__wiki/$__baseName")


done







|
>









|
|


|






|





>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

<
>

|
>

<
<
>
>

|

|



|
|

|
>

<
|
>
>

3
4
5
6
7
8
9
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
# Multi-Phasic Applications: SquirrelJME
#     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
#     Copyright (C) Multi-Phasic Applications <multiphasicapps.net>
# ---------------------------------------------------------------------------
# SquirrelJME is under the GNU General Public License v3+, or later.
# See license.mkd for licensing and copyright information.
# ---------------------------------------------------------------------------
# DESCRIPTION: Wikifies SquirrelJME for GitHub, since GitHub uses a different
# format for their Wikis...

# Must be valid!
if [ "$#" -lt "2" ]
then
	echo "Usage: $0 [repo] [wiki-git-repo]"
	exit 1
fi

# These are directories
__foss="$1/assets/user-guide"
__gith="$2"

# These both must be directories
if [ ! -d "$__foss" ] || [ ! -d "$__gith" ]
then
	echo "Both arguments must be directories."
	exit 1
fi

# Target must be a Git repo
if [ ! -d "$__gith/.git" ]
then
	echo "Target not a Git repository."
	exit 1
fi

# Convert to GitHub name
__toGitHubName()
{
	__srcName="$1"
	echo "$__srcName" | sed 's/\.mkd$/\.markdown/'
}

# Convert to Fossil name
__toFossilName()
{
	__srcName="$1"
	echo "$__srcName" | sed 's/\.markdown$/\.mkd/'
}

# Remove any other old files
find "$__gith" -type f | grep -e '\.mkd$' -e '\.md$' | while read __githFile
do
	echo "Removing old file $__githFile..."
	git rm -f "$__githFile"
done

# Remove any files which are missing

find "$__gith" -type f | grep '\.markdown$' | while read __githFile
do
	__baseGith="$(basename "$__githFile")"
	__baseFoss="$(__toFossilName "$__baseGith")"
	


	# The file may be in the root of the project or elsewhere...
	if ! find "$__foss/" -type f | grep "$__baseFoss" > /dev/null
	then
		echo "Removing file $__githFile (aka $__baseFoss)..."
		
		git rm -f "$__githFile"
	fi
done

# Copy and convert the files for GitHub's Wiki
find "$__foss" -type f | grep '\.mkd$' | while read __fossFile
do
	__baseFoss="$(basename "$__fossFile")"
	__baseGith="$(__toGitHubName "$__baseFoss")"
	

	# Links need to be properly converted or they will be lost
	sed 's/(\([^.]*\)\.mkd)/(\1)/g' < "$__fossFile" > "$__gith/$__baseGith"
	(cd "$__gith" && git add "$__gith/$__baseGith")
done

Name change from assets/user-guide/_Footer.md to assets/user-guide/.github/_Footer.mkd.

Name change from assets/user-guide/_Sidebar.md to assets/user-guide/.github/_Sidebar.mkd.

Name change from assets/user-guide/faq.md to assets/user-guide/faq.mkd.

Name change from assets/user-guide/Home.md to assets/user-guide/readme.mkd.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
guide is intended to make it easier to use **SquirrelJME** so you can have
some fun with it and otherwise!

 * Main Website: <https://squirreljme.cc/>

You may view this guide on the following:

 * [Main Website](https://squirreljme.cc/doc/ckout/assets/user-guide/Home.md)
 * [GitHub](https://github.com/SquirrelJME/SquirrelJME/wiki)

## Table of Contents

 * [Frequently Asked Questions](faq.md)
 * [List of errors](error-list.md)







|




|
|
4
5
6
7
8
9
10
11
12
13
14
15
16
17
guide is intended to make it easier to use **SquirrelJME** so you can have
some fun with it and otherwise!

 * Main Website: <https://squirreljme.cc/>

You may view this guide on the following:

 * [SquirrelJME.cc](https://squirreljme.cc/doc/trunk/assets/user-guide/readme.mkd)
 * [GitHub](https://github.com/SquirrelJME/SquirrelJME/wiki)

## Table of Contents

 * [Frequently Asked Questions](faq.mkd)
 * [List of errors](error-list.mkd)

Changes to readme.mkd.

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
   https://hub.docker.com/r/xerthesquirrel/squirreljme/builds)
 * [![Download SquirrelJME](
   https://img.shields.io/sourceforge/dm/squirreljme.svg)](
   https://sourceforge.net/projects/squirreljme/files/latest/download)

Information:

 * [User Guide](assets/user-guide/Home.md)
 * [Code of Conduct](code-of-conduct.mkd)
 * [License](license.mkd)
   * _Source_: GNU General Public License, Version 3 or later
   * _Assets_: Creative Commons CC-BY-SA 4.0
   * _Fonts_ : SIL Open Font License Version 1.1
 * [Contributing to SquirrelJME](contributing.mkd)
 * _End-User Documents_







|







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
   https://hub.docker.com/r/xerthesquirrel/squirreljme/builds)
 * [![Download SquirrelJME](
   https://img.shields.io/sourceforge/dm/squirreljme.svg)](
   https://sourceforge.net/projects/squirreljme/files/latest/download)

Information:

 * [User Guide](assets/user-guide/readme.mkd)
 * [Code of Conduct](code-of-conduct.mkd)
 * [License](license.mkd)
   * _Source_: GNU General Public License, Version 3 or later
   * _Assets_: Creative Commons CC-BY-SA 4.0
   * _Fonts_ : SIL Open Font License Version 1.1
 * [Contributing to SquirrelJME](contributing.mkd)
 * _End-User Documents_