Create examples directory on init

pull/23/head
Mark Qvist 2023-02-04 16:43:50 +01:00
parent a4f5b28707
commit 681295a818
3 changed files with 12 additions and 0 deletions

View File

@ -111,6 +111,7 @@ class NomadNetworkApp:
self.pagespath = self.configdir+"/storage/pages"
self.filespath = self.configdir+"/storage/files"
self.cachepath = self.configdir+"/storage/cache"
self.examplespath = self.configdir+"/examples"
self.downloads_path = os.path.expanduser("~/Downloads")
@ -169,6 +170,9 @@ class NomadNetworkApp:
else:
RNS.log("Could not load config file, creating default configuration file...")
self.createDefaultConfig()
if not os.path.isdir(self.examplespath):
os.makedirs(self.examplespath)
self.firstrun = True
if os.path.isfile(self.identitypath):

View File

@ -3,4 +3,5 @@ quotes = [
("That's enough entropy for you my friend", "Unknown"),
("Any time two people connect online, it's financed by a third person who believes they can manipulate the first two", "Jaron Lanier"),
("The landscape of the future is set, but how one will march across it is not determined", "Terence McKenna")
("Freedom originates in the division of power, despotism in its concentration.", "John Acton")
]

View File

@ -5,6 +5,12 @@ exec(open("nomadnet/_version.py", "r").read())
with open("README.md", "r") as fh:
long_description = fh.read()
package_data = {
"": [
"examples/messageboard/*",
]
}
setuptools.setup(
name="nomadnet",
version=__version__,
@ -15,6 +21,7 @@ setuptools.setup(
long_description_content_type="text/markdown",
url="https://github.com/markqvist/nomadnet",
packages=setuptools.find_packages(),
package_data=package_data,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",