Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wqweto committed Feb 29, 2024
0 parents commit 68eb93f
Show file tree
Hide file tree
Showing 163 changed files with 2,674 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Deploy
on:
push:
branches: [ master ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install latex
run: |
sudo apt-get update -y
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
pip install rinohtype
cp _static/cls.py /usr/local/lib/python3.8/site-packages/rinoh/language
cp _static/bg.py /usr/local/lib/python3.8/site-packages/rinoh/language
ll /usr/local/lib/python3.8/site-packages/rinoh/language
- name: Build
uses: ammaraskar/sphinx-action@master
with:
docs-folder: .
build-command: "make html rinoh"

- name: Deploy HTML
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: _build/html
SINGLE_COMMIT: true

- name: Deploy PDF
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: pdfs
FOLDER: _build/rinoh
SINGLE_COMMIT: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build/**
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs.unicontsoft.com
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions _static/bg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.


from .cls import Language
from ..structure import SectionTitles, AdmonitionTitles


BG = Language('bg', 'Български')

SectionTitles(
contents='Съдържание',
list_of_figures='Списък фигури',
list_of_tables='Списък таблици',
chapter='Глава',
index='Индекс',
) in BG

AdmonitionTitles(
attention='Внимание!',
caution='Внимание!',
danger='!ОПАСНОСТ!',
error='Грешка',
hint='Подсказка',
important='Важно',
note='Бележка',
tip='Съвет',
warning='Внимание',
seealso='Виж също',
) in BG

58 changes: 58 additions & 0 deletions _static/cls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.


import weakref

from ..attribute import AttributeType
from ..strings import StringCollection


__all__ = ['Language']


class Language(AttributeType):
"""Collects localized strings for a particular language
Args:
code (str): short code identifying the language
name (str): native name of the language
"""

languages = {} #: Dictionary mapping codes to :class:`Language`\ s

def __init__(self, code, name):
self.languages[code] = weakref.ref(self)
self.code = code
self.name = name
self.strings = {}
self.no_break_after = []

def __repr__(self):
return "{}('{}', '{}')".format(type(self).__name__,
self.code, self.name)

def __contains__(self, item):
assert isinstance(item, StringCollection)
strings_class = type(item)
assert strings_class not in self.strings
self.strings[strings_class] = item

@classmethod
def parse_string(cls, string, source):
return cls.languages[string.lower()]()

@classmethod
def doc_repr(cls, value):
return ':data:`~.rinoh.language.{}` ({})'.format(value.code.upper(),
value.name)

@classmethod
def doc_format(cls):
return ('the code of one of the '
':ref:`supported languages <supported_languages>`')
Empty file added _static/tweaks.css
Empty file.
8 changes: 8 additions & 0 deletions blog/000-index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Блог

```{toctree}
:glob:
:reversed:
*
```
18 changes: 18 additions & 0 deletions blog/20240219-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Как да използваме Dreem POS в локална мрежа

```{warning}
ВАЖНО! Unicontsoft не поддържа подобна настройка на системата! Описанието и стъпките по-долу са FYI (само за информация)!
```

Приемаме че имате Windows локална мрежа с компютри POS-PC и DREEM-PC и искате Dreem POS на първата машина (POS-PC) да използва базата данни на Dreem Personal на другата машина (DREEM-PC).

1. Уверете се, че на POS-PC можете да отваряте и копирате файлове от машина DREEM-PC
- ако машините са в domain, използвайте потребител от domain-а
- ако машините са в workgroup, настройка Sharing and security model for local accounts трябва да е Classic – local users authenticate as themselves и паролата на текущия потребител на POS-PC трябва да съвпада с паролата на същия потрелител на DREEM-PC
- във firewall.cpl в раздел Exceptions трябва да е разрешен File and Print Sharing
2. След това се уверете, че на двете машини има инсталирана еднаква последна реализация на Dreem Personal

На POS-PC трябва да настроите пренасочващ псевдоним с име ucs-instance, който ще се използва от Dreem Pos за да достъпва базата данни на Dreem Personal

1. На POS-PC от Start->Run стартирайте cliconfg.exe (На 64-битови OS стартирайте C:\Windows\SysWOW64\cliconfg.exe)
2. В раздел Alias на Client Network Utility създавайте нов псевдоним ucs-instance (виж т.1 на графиката) по Named Pipes (виж т.2) и го насочете към инстанция DREEM-PC\UCS (виж т.3)
76 changes: 76 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "Dreem User's Manual"
copyright = "2024 by Unicontsoft"
author = "Unicontsoft"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['myst_parser']

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

master_doc = "index"
language = 'bg'

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_book_theme'
# html_logo = "_static/logo-wide.svg"
html_title = "Unicontsoft Dreem"
html_copy_source = True
# html_favicon = "_static/logo-square.svg"
html_last_updated_fmt = ""

html_static_path = ['_static']

html_theme_options = {
"path_to_docs": "manual",
"repository_url": "https://github.com/Unicontsoft/Docs",
"use_repository_button": True,
"navigation_with_keys" : True,
# "home_page_in_toc": True,
"use_edit_page_button": True,
"use_source_button": True,
"use_issues_button": True,
# "use_repository_button": True,
"use_download_button": True,
"use_sidenotes": True,
"show_toc_level": 6,
"collapse_navigation": False,
}


# -- Options for rinohtype PDF output -------------------------------------
# , logo='_static/rinohtype_logo.pdf'
rinoh_documents = [
dict(doc='manual/000-index', target='manual', title='Ръководство на потребителя', subtitle='версия 1.5',
author='Униконт Софт ООД', toctree_only=False,
template='manual.rtt'),
]

myst_enable_extensions = [
"amsmath",
"attrs_inline",
"colon_fence",
"deflist",
"dollarmath",
"fieldlist",
"html_admonition",
"html_image",
# "linkify",
"replacements",
"smartquotes",
"strikethrough",
"substitution",
"tasklist",
]
17 changes: 17 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Документация

- [Ръководство на потребителя](manual/000-index.md)
- [Блог](blog/000-index.md)

## Индекси

```{eval-rst}
* :ref:`genindex`
* :ref:`search`
```

```{toctree}
:hidden:
manual/000-index.md
blog/000-index.md
```
35 changes: 35 additions & 0 deletions make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
30 changes: 30 additions & 0 deletions manual.rts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[STYLESHEET]
name=MyStyle
base=sphinx

[VARIABLES]
mono_typeface=TeX Gyre Cursor
serif_typeface=DejaVu Serif
sans_typeface=Roboto

[heading level 1]
page_break=any

[heading level 3]
page_break=none

[inline image]
padding_top = 0.5cm
padding_bottom = 0.25cm

[admonition]
space_above = 0.25cm
space_below = 0.25cm
padding_top = 0.25cm
padding_bottom = 0.5cm
padding_left = 0.5cm
padding_right = 0.5cm

[centered]
base=default
text_align=CENTER
32 changes: 32 additions & 0 deletions manual.rtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[TEMPLATE_CONFIGURATION]
name = Manual Configuration
template = book

parts =
title
;front_matter
contents
;back_matter
stylesheet = manual.rts
language = bg

[SectionTitles]
contents = 'Съдържание'

[AdmonitionTitles]
caution = 'Внимание!'
warning = 'Внимание'
tip = ''

[VARIABLES]
paper_size = A4

[front_matter]
page_number_format = lowercase roman
end_at_page = left

[contents]
page_number_format = number

[title_page]
top_margin = 2cm
Loading

0 comments on commit 68eb93f

Please sign in to comment.