diff --git a/Docker/Dockerfile.private_dynamic b/Docker/Dockerfile.private_dynamic index 59942df..861c267 100644 --- a/Docker/Dockerfile.private_dynamic +++ b/Docker/Dockerfile.private_dynamic @@ -1,10 +1,10 @@ FROM python:3-slim +RUN apt-get update && apt-get -y install build-essential ghostscript && apt-get clean + # set a directory for the app RUN groupadd app && useradd -m -g app app - - # install dependencies WORKDIR /srv RUN pip3 install setuptools gunicorn @@ -14,6 +14,7 @@ RUN pip3 install --no-cache-dir -r webinterface/requirements.txt # copy all the files to the container COPY app.py /srv +COPY font /srv/font COPY private-dynamic /srv/webinterface COPY models/__init__.py models/system.py models/gtfs_work.py models/gtfs_static.py /srv/webinterface/models RUN chown -R app:app /srv diff --git a/font/ALEE_copyright.txt b/font/ALEE_copyright.txt new file mode 100644 index 0000000..b460ce2 --- /dev/null +++ b/font/ALEE_copyright.txt @@ -0,0 +1,10 @@ +This package was debianized by A Lee on +Sun, 18 Jul 2004 09:30:17 +0900. + +Copyright 2006 (C) A Lee . All rights reserved. + All the fonts are free; you can redistribute them and/or modify them + under the terms of the Artistic License; either version 1.0 of the + License, or (at your option) any later version. + + On Debian systems, the complete text of the Artistic License can be + found in the /usr/share/common-licenses/Artistic file. diff --git a/font/Bandal.ttf b/font/Bandal.ttf new file mode 100644 index 0000000..6a3d6ba Binary files /dev/null and b/font/Bandal.ttf differ diff --git a/font/Bangwool.ttf b/font/Bangwool.ttf new file mode 100644 index 0000000..f2d96b5 Binary files /dev/null and b/font/Bangwool.ttf differ diff --git a/font/DejaVuSans-Bold.ttf b/font/DejaVuSans-Bold.ttf new file mode 100644 index 0000000..0f4d5e9 Binary files /dev/null and b/font/DejaVuSans-Bold.ttf differ diff --git a/font/DejaVuSans-BoldOblique.ttf b/font/DejaVuSans-BoldOblique.ttf new file mode 100644 index 0000000..48f06a8 Binary files /dev/null and b/font/DejaVuSans-BoldOblique.ttf differ diff --git a/font/DejaVuSans-ExtraLight.ttf b/font/DejaVuSans-ExtraLight.ttf new file mode 100644 index 0000000..01a5652 Binary files /dev/null and b/font/DejaVuSans-ExtraLight.ttf differ diff --git a/font/DejaVuSans-Oblique.ttf b/font/DejaVuSans-Oblique.ttf new file mode 100644 index 0000000..4485638 Binary files /dev/null and b/font/DejaVuSans-Oblique.ttf differ diff --git a/font/DejaVuSans.ttf b/font/DejaVuSans.ttf new file mode 100644 index 0000000..27cff47 Binary files /dev/null and b/font/DejaVuSans.ttf differ diff --git a/font/DejaVuSansCondensed-Bold.ttf b/font/DejaVuSansCondensed-Bold.ttf new file mode 100644 index 0000000..9edd89c Binary files /dev/null and b/font/DejaVuSansCondensed-Bold.ttf differ diff --git a/font/DejaVuSansCondensed-BoldOblique.ttf b/font/DejaVuSansCondensed-BoldOblique.ttf new file mode 100644 index 0000000..e2db5ce Binary files /dev/null and b/font/DejaVuSansCondensed-BoldOblique.ttf differ diff --git a/font/DejaVuSansCondensed-Oblique.ttf b/font/DejaVuSansCondensed-Oblique.ttf new file mode 100644 index 0000000..7cec04c Binary files /dev/null and b/font/DejaVuSansCondensed-Oblique.ttf differ diff --git a/font/DejaVuSansCondensed.ttf b/font/DejaVuSansCondensed.ttf new file mode 100644 index 0000000..826e619 Binary files /dev/null and b/font/DejaVuSansCondensed.ttf differ diff --git a/font/DejaVuSansMono-Bold.ttf b/font/DejaVuSansMono-Bold.ttf new file mode 100644 index 0000000..09d4279 Binary files /dev/null and b/font/DejaVuSansMono-Bold.ttf differ diff --git a/font/DejaVuSansMono-BoldOblique.ttf b/font/DejaVuSansMono-BoldOblique.ttf new file mode 100644 index 0000000..0344c22 Binary files /dev/null and b/font/DejaVuSansMono-BoldOblique.ttf differ diff --git a/font/DejaVuSansMono-Oblique.ttf b/font/DejaVuSansMono-Oblique.ttf new file mode 100644 index 0000000..bc16d51 Binary files /dev/null and b/font/DejaVuSansMono-Oblique.ttf differ diff --git a/font/DejaVuSansMono.ttf b/font/DejaVuSansMono.ttf new file mode 100644 index 0000000..7260bd6 Binary files /dev/null and b/font/DejaVuSansMono.ttf differ diff --git a/font/DejaVuSerif-Bold.ttf b/font/DejaVuSerif-Bold.ttf new file mode 100644 index 0000000..afa2d5e Binary files /dev/null and b/font/DejaVuSerif-Bold.ttf differ diff --git a/font/DejaVuSerif-BoldItalic.ttf b/font/DejaVuSerif-BoldItalic.ttf new file mode 100644 index 0000000..ce9443e Binary files /dev/null and b/font/DejaVuSerif-BoldItalic.ttf differ diff --git a/font/DejaVuSerif-Italic.ttf b/font/DejaVuSerif-Italic.ttf new file mode 100644 index 0000000..c1864a3 Binary files /dev/null and b/font/DejaVuSerif-Italic.ttf differ diff --git a/font/DejaVuSerif.ttf b/font/DejaVuSerif.ttf new file mode 100644 index 0000000..ed53a29 Binary files /dev/null and b/font/DejaVuSerif.ttf differ diff --git a/font/DejaVuSerifCondensed-Bold.ttf b/font/DejaVuSerifCondensed-Bold.ttf new file mode 100644 index 0000000..55adca4 Binary files /dev/null and b/font/DejaVuSerifCondensed-Bold.ttf differ diff --git a/font/DejaVuSerifCondensed-BoldItalic.ttf b/font/DejaVuSerifCondensed-BoldItalic.ttf new file mode 100644 index 0000000..e211957 Binary files /dev/null and b/font/DejaVuSerifCondensed-BoldItalic.ttf differ diff --git a/font/DejaVuSerifCondensed-Italic.ttf b/font/DejaVuSerifCondensed-Italic.ttf new file mode 100644 index 0000000..275b26d Binary files /dev/null and b/font/DejaVuSerifCondensed-Italic.ttf differ diff --git a/font/DejaVuSerifCondensed.ttf b/font/DejaVuSerifCondensed.ttf new file mode 100644 index 0000000..83120cd Binary files /dev/null and b/font/DejaVuSerifCondensed.ttf differ diff --git a/font/DejaVu_LICENSE.txt b/font/DejaVu_LICENSE.txt new file mode 100644 index 0000000..254e2cc --- /dev/null +++ b/font/DejaVu_LICENSE.txt @@ -0,0 +1,99 @@ +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. +Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) + +Bitstream Vera Fonts Copyright +------------------------------ + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is +a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated +documentation files (the "Font Software"), to reproduce and distribute the +Font Software, including without limitation the rights to use, copy, merge, +publish, distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to the +following conditions: + +The above copyright and trademark notices and this permission notice shall +be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional glyphs or characters may be added to the Fonts, only if the fonts +are renamed to names not containing either the words "Bitstream" or the word +"Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream +Vera" names. + +The Font Software may be sold as part of a larger software package but no +copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME +FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING +ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE +FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome +Foundation, and Bitstream Inc., shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this Font Software +without prior written authorization from the Gnome Foundation or Bitstream +Inc., respectively. For further information, contact: fonts at gnome dot +org. + +Arev Fonts Copyright +------------------------------ + +Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the fonts accompanying this license ("Fonts") and +associated documentation files (the "Font Software"), to reproduce +and distribute the modifications to the Bitstream Vera Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to +the following conditions: + +The above copyright and trademark notices and this permission notice +shall be included in all copies of one or more of the Font Software +typefaces. + +The Font Software may be modified, altered, or added to, and in +particular the designs of glyphs or characters in the Fonts may be +modified and additional glyphs or characters may be added to the +Fonts, only if the fonts are renamed to names not containing either +the words "Tavmjong Bah" or the word "Arev". + +This License becomes null and void to the extent applicable to Fonts +or Font Software that has been modified and is distributed under the +"Tavmjong Bah Arev" names. + +The Font Software may be sold as part of a larger software package but +no copy of one or more of the Font Software typefaces may be sold by +itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL +TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +Except as contained in this notice, the name of Tavmjong Bah shall not +be used in advertising or otherwise to promote the sale, use or other +dealings in this Font Software without prior written authorization +from Tavmjong Bah. For further information, contact: tavmjong @ free +. fr. + +$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $ diff --git a/font/Eunjin.ttf b/font/Eunjin.ttf new file mode 100644 index 0000000..c37dc32 Binary files /dev/null and b/font/Eunjin.ttf differ diff --git a/font/EunjinNakseo.ttf b/font/EunjinNakseo.ttf new file mode 100644 index 0000000..afa5ead Binary files /dev/null and b/font/EunjinNakseo.ttf differ diff --git a/font/FireFly_COPYRIGHT.txt b/font/FireFly_COPYRIGHT.txt new file mode 100644 index 0000000..06b636b --- /dev/null +++ b/font/FireFly_COPYRIGHT.txt @@ -0,0 +1,172 @@ + Copyright (C) 1994-1999, Arphic Technology Co., Ltd. + Copyright (C) 1999-2004, Firefly and Arphic Technology Co., Ltd. + +Author/Designer: + Original author: + Arphic Technology Co., Ltd. + http://www.arphic.com.tw/ + + Modified by: + Firefly + http://firefly.idv.tw + +NOTICE: This Truetype font contains embedded bitmap fonts made + by firefly and is released as a whole + under the ARPHIC PUBLIC LICENSE. + There are also seperate bitmap fonts made by Firefly and + released under the GENERAL PUBLIC LICENSE (GPL): + http://www.study-area.org/apt/firefly-font/bitmaps/ + +Copyright: + (Copied from 'license/english/ARPHICPL.TXT'. + See 'license/big5/ARPHICPL.TXT' or 'license/gb/ARPHICPL.TXT' + for the Chinese version.) + +========================================================================== + +ARPHIC PUBLIC LICENSE + +Copyright (C) 1999 Arphic Technology Co., Ltd. +11Fl. No.168, Yung Chi Rd., Taipei, 110 Taiwan +All rights reserved except as specified below. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is forbidden. + +Preamble + + The licenses for most software are designed to take away your freedom +to share and change it. By contrast, the ARPHIC PUBLIC LICENSE +specifically permits and encourages you to use this software, provided +that you give the recipients all the rights that we gave you and make +sure they can get the modifications of this software. + +Legal Terms + +0. Definitions: + Throughout this License, "Font" means the TrueType fonts "AR PL +Mingti2L Big5", "AR PL KaitiM Big5" (BIG-5 character set) and "AR PL +SungtiL GB", "AR PL KaitiM GB" (GB character set) which are originally +distributed by Arphic, and the derivatives of those fonts created +through any modification including modifying glyph, reordering glyph, +converting format, changing font name, or adding/deleting some +characters in/from glyph table. + + "PL" means "Public License". + + "Copyright Holder" means whoever is named in the copyright or +copyrights for the Font. + + "You" means the licensee, or person copying, redistributing or +modifying the Font. + + "Freely Available" means that you have the freedom to copy or modify +the Font as well as redistribute copies of the Font under the same +conditions you received, not price. If you wish, you can charge for this +service. + +1. Copying & Distribution + You may copy and distribute verbatim copies of this Font in any +medium, without restriction, provided that you retain this license file +(ARPHICPL.TXT) unaltered in all copies. + +2. Modification + You may otherwise modify your copy of this Font in any way, including +modifying glyph, reordering glyph, converting format, changing font +name, or adding/deleting some characters in/from glyph table, and copy +and distribute such modifications under the terms of Section 1 above, +provided that the following conditions are met: + + a) You must insert a prominent notice in each modified file stating +how and when you changed that file. + + b) You must make such modifications Freely Available as a whole to +all third parties under the terms of this License, such as by offering +access to copy the modifications from a designated place, or +distributing the modifications on a medium customarily used for software +interchange. + + c) If the modified fonts normally reads commands interactively when +run, you must cause it, when started running for such interactive use in +the most ordinary way, to print or display an announcement including an +appropriate copyright notice and a notice that there is no warranty (or +else, saying that you provide a warranty) and that users may +redistribute the Font under these conditions, and telling the user how +to view a copy of this License. + + These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Font, and +can be reasonably considered independent and separate works in +themselves, then this License and its terms, do not apply to those +sections when you distribute them as separate works. Therefore, mere +aggregation of another work not based on the Font with the Font on a +volume of a storage or distribution medium does not bring the other work +under the scope of this License. + +3. Condition Subsequent + You may not copy, modify, sublicense, or distribute the Font except +as expressly provided under this License. Any attempt otherwise to copy, +modify, sublicense or distribute the Font will automatically +retroactively void your rights under this License. However, parties who +have received copies or rights from you under this License will keep +their licenses valid so long as such parties remain in full compliance. + +4. Acceptance + You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to copy, modify, +sublicense or distribute the Font. These actions are prohibited by law +if you do not accept this License. Therefore, by copying, modifying, +sublicensing or distributing the Font, you indicate your acceptance of +this License and all its terms and conditions. + +5. Automatic Receipt + Each time you redistribute the Font, the recipient automatically +receives a license from the original licensor to copy, distribute or +modify the Font subject to these terms and conditions. You may not +impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance +by third parties to this License. + +6. Contradiction + If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot distribute +so as to satisfy simultaneously your obligations under this License and +any other pertinent obligations, then as a consequence you may not +distribute the Font at all. For example, if a patent license would not +permit royalty-free redistribution of the Font by all those who receive +copies directly or indirectly through you, then the only way you could +satisfy both it and this License would be to refrain entirely from +distribution of the Font. + + If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +7. NO WARRANTY + BECAUSE THE FONT IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE FONT, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS OR OTHER PARTIES +PROVIDE THE FONT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE FONT IS WITH YOU. SHOULD THE FONT +PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR +OR CORRECTION. + +8. DAMAGES WAIVER + UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, IN NO +EVENT WILL ANY COPYRIGHTT HOLDERS, OR OTHER PARTIES WHO MAY COPY, MODIFY +OR REDISTRIBUTE THE FONT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR ANY +DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, SPECIAL OR EXEMPLARY +DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE FONT (INCLUDING +BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA OR PROFITS; OR BUSINESS INTERRUPTION), EVEN IF SUCH HOLDERS OR +OTHER PARTIES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +====================================================================== + + diff --git a/font/Garuda-Bold.ttf b/font/Garuda-Bold.ttf new file mode 100644 index 0000000..372d6da Binary files /dev/null and b/font/Garuda-Bold.ttf differ diff --git a/font/Garuda-BoldOblique.ttf b/font/Garuda-BoldOblique.ttf new file mode 100644 index 0000000..5bdd486 Binary files /dev/null and b/font/Garuda-BoldOblique.ttf differ diff --git a/font/Garuda-Oblique.ttf b/font/Garuda-Oblique.ttf new file mode 100644 index 0000000..d76bffb Binary files /dev/null and b/font/Garuda-Oblique.ttf differ diff --git a/font/Garuda.ttf b/font/Garuda.ttf new file mode 100644 index 0000000..54304f5 Binary files /dev/null and b/font/Garuda.ttf differ diff --git a/font/Guseul.ttf b/font/Guseul.ttf new file mode 100644 index 0000000..3d742da Binary files /dev/null and b/font/Guseul.ttf differ diff --git a/font/Kedage-b.ttf b/font/Kedage-b.ttf new file mode 100644 index 0000000..7571116 Binary files /dev/null and b/font/Kedage-b.ttf differ diff --git a/font/Kedage-n.ttf b/font/Kedage-n.ttf new file mode 100644 index 0000000..6a84298 Binary files /dev/null and b/font/Kedage-n.ttf differ diff --git a/font/Kinnari-Bold.ttf b/font/Kinnari-Bold.ttf new file mode 100644 index 0000000..da9cb01 Binary files /dev/null and b/font/Kinnari-Bold.ttf differ diff --git a/font/Kinnari-BoldItalic.ttf b/font/Kinnari-BoldItalic.ttf new file mode 100644 index 0000000..38bc001 Binary files /dev/null and b/font/Kinnari-BoldItalic.ttf differ diff --git a/font/Kinnari-BoldOblique.ttf b/font/Kinnari-BoldOblique.ttf new file mode 100644 index 0000000..5262f25 Binary files /dev/null and b/font/Kinnari-BoldOblique.ttf differ diff --git a/font/Kinnari-Italic.ttf b/font/Kinnari-Italic.ttf new file mode 100644 index 0000000..4d3ecad Binary files /dev/null and b/font/Kinnari-Italic.ttf differ diff --git a/font/Kinnari-Oblique.ttf b/font/Kinnari-Oblique.ttf new file mode 100644 index 0000000..825e806 Binary files /dev/null and b/font/Kinnari-Oblique.ttf differ diff --git a/font/Kinnari.ttf b/font/Kinnari.ttf new file mode 100644 index 0000000..0e840fc Binary files /dev/null and b/font/Kinnari.ttf differ diff --git a/font/Loma-Bold.ttf b/font/Loma-Bold.ttf new file mode 100644 index 0000000..98d8f75 Binary files /dev/null and b/font/Loma-Bold.ttf differ diff --git a/font/Loma-BoldOblique.ttf b/font/Loma-BoldOblique.ttf new file mode 100644 index 0000000..09cf2d7 Binary files /dev/null and b/font/Loma-BoldOblique.ttf differ diff --git a/font/Loma-Oblique.ttf b/font/Loma-Oblique.ttf new file mode 100644 index 0000000..0223cef Binary files /dev/null and b/font/Loma-Oblique.ttf differ diff --git a/font/Loma.ttf b/font/Loma.ttf new file mode 100644 index 0000000..ab5535d Binary files /dev/null and b/font/Loma.ttf differ diff --git a/font/Malige-b.ttf b/font/Malige-b.ttf new file mode 100644 index 0000000..1f1692f Binary files /dev/null and b/font/Malige-b.ttf differ diff --git a/font/Malige-n.ttf b/font/Malige-n.ttf new file mode 100644 index 0000000..7947a3a Binary files /dev/null and b/font/Malige-n.ttf differ diff --git a/font/Meera_04.ttf b/font/Meera_04.ttf new file mode 100644 index 0000000..e4610fe Binary files /dev/null and b/font/Meera_04.ttf differ diff --git a/font/MuktiNarrow.ttf b/font/MuktiNarrow.ttf new file mode 100644 index 0000000..7c80f98 Binary files /dev/null and b/font/MuktiNarrow.ttf differ diff --git a/font/MuktiNarrowBold.ttf b/font/MuktiNarrowBold.ttf new file mode 100644 index 0000000..4cd05c7 Binary files /dev/null and b/font/MuktiNarrowBold.ttf differ diff --git a/font/Norasi-Bold.ttf b/font/Norasi-Bold.ttf new file mode 100644 index 0000000..b9b79e3 Binary files /dev/null and b/font/Norasi-Bold.ttf differ diff --git a/font/Norasi-BoldItalic.ttf b/font/Norasi-BoldItalic.ttf new file mode 100644 index 0000000..b23afec Binary files /dev/null and b/font/Norasi-BoldItalic.ttf differ diff --git a/font/Norasi-BoldOblique.ttf b/font/Norasi-BoldOblique.ttf new file mode 100644 index 0000000..3ee71a7 Binary files /dev/null and b/font/Norasi-BoldOblique.ttf differ diff --git a/font/Norasi-Italic.ttf b/font/Norasi-Italic.ttf new file mode 100644 index 0000000..e0fb275 Binary files /dev/null and b/font/Norasi-Italic.ttf differ diff --git a/font/Norasi-Oblique.ttf b/font/Norasi-Oblique.ttf new file mode 100644 index 0000000..8094d20 Binary files /dev/null and b/font/Norasi-Oblique.ttf differ diff --git a/font/Norasi.ttf b/font/Norasi.ttf new file mode 100644 index 0000000..34d84b9 Binary files /dev/null and b/font/Norasi.ttf differ diff --git a/font/Purisa-Bold.ttf b/font/Purisa-Bold.ttf new file mode 100644 index 0000000..0f529ff Binary files /dev/null and b/font/Purisa-Bold.ttf differ diff --git a/font/Purisa-BoldOblique.ttf b/font/Purisa-BoldOblique.ttf new file mode 100644 index 0000000..2481fcf Binary files /dev/null and b/font/Purisa-BoldOblique.ttf differ diff --git a/font/Purisa-Oblique.ttf b/font/Purisa-Oblique.ttf new file mode 100644 index 0000000..d066048 Binary files /dev/null and b/font/Purisa-Oblique.ttf differ diff --git a/font/Purisa.ttf b/font/Purisa.ttf new file mode 100644 index 0000000..31ca5f1 Binary files /dev/null and b/font/Purisa.ttf differ diff --git a/font/Sawasdee-Bold.ttf b/font/Sawasdee-Bold.ttf new file mode 100644 index 0000000..30df072 Binary files /dev/null and b/font/Sawasdee-Bold.ttf differ diff --git a/font/Sawasdee-BoldOblique.ttf b/font/Sawasdee-BoldOblique.ttf new file mode 100644 index 0000000..b98067d Binary files /dev/null and b/font/Sawasdee-BoldOblique.ttf differ diff --git a/font/Sawasdee-Oblique.ttf b/font/Sawasdee-Oblique.ttf new file mode 100644 index 0000000..a9244d6 Binary files /dev/null and b/font/Sawasdee-Oblique.ttf differ diff --git a/font/Sawasdee.ttf b/font/Sawasdee.ttf new file mode 100644 index 0000000..ab77d34 Binary files /dev/null and b/font/Sawasdee.ttf differ diff --git a/font/TlwgMono-Bold.ttf b/font/TlwgMono-Bold.ttf new file mode 100644 index 0000000..7a08ff5 Binary files /dev/null and b/font/TlwgMono-Bold.ttf differ diff --git a/font/TlwgMono-BoldOblique.ttf b/font/TlwgMono-BoldOblique.ttf new file mode 100644 index 0000000..930d6a3 Binary files /dev/null and b/font/TlwgMono-BoldOblique.ttf differ diff --git a/font/TlwgMono-Oblique.ttf b/font/TlwgMono-Oblique.ttf new file mode 100644 index 0000000..5f88d6c Binary files /dev/null and b/font/TlwgMono-Oblique.ttf differ diff --git a/font/TlwgMono.ttf b/font/TlwgMono.ttf new file mode 100644 index 0000000..ff3032d Binary files /dev/null and b/font/TlwgMono.ttf differ diff --git a/font/TlwgTypewriter-Bold.ttf b/font/TlwgTypewriter-Bold.ttf new file mode 100644 index 0000000..e8e543c Binary files /dev/null and b/font/TlwgTypewriter-Bold.ttf differ diff --git a/font/TlwgTypewriter-BoldOblique.ttf b/font/TlwgTypewriter-BoldOblique.ttf new file mode 100644 index 0000000..c316418 Binary files /dev/null and b/font/TlwgTypewriter-BoldOblique.ttf differ diff --git a/font/TlwgTypewriter-Oblique.ttf b/font/TlwgTypewriter-Oblique.ttf new file mode 100644 index 0000000..2d4df24 Binary files /dev/null and b/font/TlwgTypewriter-Oblique.ttf differ diff --git a/font/TlwgTypewriter.ttf b/font/TlwgTypewriter.ttf new file mode 100644 index 0000000..4f8e26c Binary files /dev/null and b/font/TlwgTypewriter.ttf differ diff --git a/font/TlwgTypist-Bold.ttf b/font/TlwgTypist-Bold.ttf new file mode 100644 index 0000000..e824aee Binary files /dev/null and b/font/TlwgTypist-Bold.ttf differ diff --git a/font/TlwgTypist-BoldOblique.ttf b/font/TlwgTypist-BoldOblique.ttf new file mode 100644 index 0000000..ea6069b Binary files /dev/null and b/font/TlwgTypist-BoldOblique.ttf differ diff --git a/font/TlwgTypist-Oblique.ttf b/font/TlwgTypist-Oblique.ttf new file mode 100644 index 0000000..5ab2e10 Binary files /dev/null and b/font/TlwgTypist-Oblique.ttf differ diff --git a/font/TlwgTypist.ttf b/font/TlwgTypist.ttf new file mode 100644 index 0000000..3e7426f Binary files /dev/null and b/font/TlwgTypist.ttf differ diff --git a/font/TlwgTypo-Bold.ttf b/font/TlwgTypo-Bold.ttf new file mode 100644 index 0000000..8542d90 Binary files /dev/null and b/font/TlwgTypo-Bold.ttf differ diff --git a/font/TlwgTypo-BoldOblique.ttf b/font/TlwgTypo-BoldOblique.ttf new file mode 100644 index 0000000..f597795 Binary files /dev/null and b/font/TlwgTypo-BoldOblique.ttf differ diff --git a/font/TlwgTypo-Oblique.ttf b/font/TlwgTypo-Oblique.ttf new file mode 100644 index 0000000..376bfbd Binary files /dev/null and b/font/TlwgTypo-Oblique.ttf differ diff --git a/font/TlwgTypo.ttf b/font/TlwgTypo.ttf new file mode 100644 index 0000000..a722d5a Binary files /dev/null and b/font/TlwgTypo.ttf differ diff --git a/font/Umpush-Bold.ttf b/font/Umpush-Bold.ttf new file mode 100644 index 0000000..c829808 Binary files /dev/null and b/font/Umpush-Bold.ttf differ diff --git a/font/Umpush-BoldOblique.ttf b/font/Umpush-BoldOblique.ttf new file mode 100644 index 0000000..195d40e Binary files /dev/null and b/font/Umpush-BoldOblique.ttf differ diff --git a/font/Umpush-Light.ttf b/font/Umpush-Light.ttf new file mode 100644 index 0000000..2226df1 Binary files /dev/null and b/font/Umpush-Light.ttf differ diff --git a/font/Umpush-LightOblique.ttf b/font/Umpush-LightOblique.ttf new file mode 100644 index 0000000..d625a52 Binary files /dev/null and b/font/Umpush-LightOblique.ttf differ diff --git a/font/Umpush-Oblique.ttf b/font/Umpush-Oblique.ttf new file mode 100644 index 0000000..922fc6d Binary files /dev/null and b/font/Umpush-Oblique.ttf differ diff --git a/font/Umpush.ttf b/font/Umpush.ttf new file mode 100644 index 0000000..f2da8f0 Binary files /dev/null and b/font/Umpush.ttf differ diff --git a/font/Waree-Bold.ttf b/font/Waree-Bold.ttf new file mode 100644 index 0000000..2a969c0 Binary files /dev/null and b/font/Waree-Bold.ttf differ diff --git a/font/Waree-BoldOblique.ttf b/font/Waree-BoldOblique.ttf new file mode 100644 index 0000000..69c6bf8 Binary files /dev/null and b/font/Waree-BoldOblique.ttf differ diff --git a/font/Waree-Oblique.ttf b/font/Waree-Oblique.ttf new file mode 100644 index 0000000..23461c3 Binary files /dev/null and b/font/Waree-Oblique.ttf differ diff --git a/font/Waree.ttf b/font/Waree.ttf new file mode 100644 index 0000000..a671ec9 Binary files /dev/null and b/font/Waree.ttf differ diff --git a/font/fireflysung.ttf b/font/fireflysung.ttf new file mode 100644 index 0000000..1484f5a Binary files /dev/null and b/font/fireflysung.ttf differ diff --git a/font/gargi.ttf b/font/gargi.ttf new file mode 100644 index 0000000..8ac690a Binary files /dev/null and b/font/gargi.ttf differ diff --git a/font/indic_copyright.txt b/font/indic_copyright.txt new file mode 100644 index 0000000..a5f015c --- /dev/null +++ b/font/indic_copyright.txt @@ -0,0 +1,118 @@ +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 +Name: ttf-indic-fonts-core +Maintainer: Arne Goetje + +Files: * +Copyright: Copyright 2010 Arne Goetje +License: GPL-2+ + +Files: MuktiNarrow*.ttf +Copyright: Copyright (C) 2003 Mukta Bangla Font Project +License: GPL-2+ + +Files: lohit*.ttf +Copyright: Copyright (C) 2003 Automatic Control Equipments, Pune, INDIA + Copyright (C) 2006 Modular Infotech Pvt Ltd. + Copyright (C) 2009 Red Hat, Inc. +License: GPL-2+-BY-Font + +Files: gargi*.ttf +Copyright: Glyphs Copyright (C) Cyberscape Multimedia Ltd + Open Type rules and extra glyphsets made by Localization Team HBCSE,TIFR + Devanagari character shapes improved and maintained by Monika Shah and + Sonali Sonania of janabhaaratii Team, C-DAC, Mumbai. + +License: GPL-2+ + +Files: Rekha*.ttf +Copyright: Copyright (C) 2004-2007 Magnet Technologies Pvt Ltd +License: GPL-2+ + +Files: Kedage-*.ttf +Copyright: Copyright (C) 2005 Indian Institute of Science, Bangalore. +License: GPL-2+ + +Files: Malige-*.ttf +Copyright: Copyright (C) 2005 Indian Institute of Science, Bangalore. +License: GPL-2+ + +Files: Meera_*.ttf +Copyright: Copyright (C) 2007 Hussain K H, + Suresh P, + Swathanthra Malayalam Computing +License: GPL-2+ + +Files: Rachana_*.ttf +Copyright: Copyright (C) 2005 Rachana Akshara Vedi + (Chitrajakumar R, Hussain KH, Rajeev Sebastian, + Gangadharan N, Vijayakumaran Nair, Subash Kuraiakose) +License: GPL-2+ + +Files: utkal*.ttf +Copyright: Copyright (C) 2003 Andy White, Rajesh Pradhan + This font was constructed using modified glyphs from GPLed font ori-1-n + from Cyberscape Multimedia . +License: GPL-2+ + +Files: Pothana2000.ttf +Copyright: Copyright (C) 2000-2006 K.Desikachary +License: GPL-2+ + +Files: Vemana*.ttf +Copyright: Copyright (C) 2000-2006 K.Desikachary +License: GPL-2+ + +License: GPL-2+ + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU General Public License, + can be found in /usr/share/common-licenses/GPL-2 and + /usr/share/common-licenses/GPL-3. + +License: GPL-2+-BY-Font + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU General Public License, + can be found in /usr/share/common-licenses/GPL-2 and + /usr/share/common-licenses/GPL-3. + . + As a special exception, if you create a document which uses this font, + and embed this font or unaltered portions of this font into the + document, this font does not by itself cause the resulting document + to be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the document might be + covered by the GNU General Public License. If you modify this font, + you may extend this exception to your version of the font, but you + are not obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + diff --git a/font/lohit_bn.ttf b/font/lohit_bn.ttf new file mode 100644 index 0000000..a649558 Binary files /dev/null and b/font/lohit_bn.ttf differ diff --git a/font/lohit_gu.ttf b/font/lohit_gu.ttf new file mode 100644 index 0000000..569ce87 Binary files /dev/null and b/font/lohit_gu.ttf differ diff --git a/font/lohit_hi.ttf b/font/lohit_hi.ttf new file mode 100644 index 0000000..711f17d Binary files /dev/null and b/font/lohit_hi.ttf differ diff --git a/font/lohit_ta.ttf b/font/lohit_ta.ttf new file mode 100644 index 0000000..94ec9da Binary files /dev/null and b/font/lohit_ta.ttf differ diff --git a/font/thai_tlwg_copyright.txt b/font/thai_tlwg_copyright.txt new file mode 100644 index 0000000..b138e04 --- /dev/null +++ b/font/thai_tlwg_copyright.txt @@ -0,0 +1,131 @@ +Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=173 +Upstream-Name: thaifonts-scalable +Upstream-Contact: Theppitak Karoonboonyanan +Source: ftp://linux.thai.net/pub/thailinux/software/thaifonts-scalable + +Files: * +Copyright: 2003-2011 Theppitak Karoonboonyanan +License: GPL-2+ + On Debian systems, the complete text of the GNU General Public License, + version 2, can be found in /usr/share/common-licenses/GPL-2. + +Files: debian/* +Copyright: 2003 Chanop Silpa-Anan +Copyright: 2004 Pattara Kiatisevi +Copyright: 2005-2011 Theppitak Karoonboonyanan +License: GPL-2+ + On Debian systems, the complete text of the GNU General Public License, + version 2, can be found in /usr/share/common-licenses/GPL-2. + +Files: nf/Kinnari*.sfd +Copyright: 1999 Db Type +Copyright: 2007 National Electronics and Computer Technology Center +License: GPL-2+ with Font exception + +Files: nf/Garuda*.sfd +Copyright: Originally Public Domain +Copyright: 2001-2009 Theppitak Karoonboonyanan +License: GPL-2+ with Font exception + +Files: nf/Norasi*.sfd +Copyright: 1999 The National Font Project +Copyright: 1999 Yannis Haralambous, Virach Sornlertlamvanich and + Anutara Tantraporn +Copyright: 1999 URW++ Design & Development +Copyright: 2003-2004 Chanop Silpa-Anan +License: GPL-2+ with Font exception + +Files: nectec/Loma*.sfd +Copyright: 2003 National Electronics and Computer Technology Center +License: GPL-2+ with Font exception + +Files: tlwg/TlwgMono*.sfd +Copyright: 2003 Poonlap Veerathanabutr +License: GPL-2+ with Font exception + +Files: tlwg/TlwgTypewriter*.sfd +Copyright: 2003, 2004 Poonlap Veerathanabutr +License: GPL-2+ with Font exception + +Files: tlwg/TlwgTypist*.sfd +Copyright: 2003, 2004 Poonlap Veerathanabutr +Copyright: 2005-2007 Theppitak Karoonboonyanan +License: GPL-2+ with Font exception + +Files: tlwg/TlwgTypo*.sfd +Copyright: 2003, 2004 Poonlap Veerathanabutr +Copyright: 2005-2007 Theppitak Karoonboonyanan +License: GPL-2+ with Font exception + +Files: tlwg/Purisa.sfd +Copyright: 2003, 2004 Poonlap Veerathanabutr +License: GPL-2+ with Font exception + +Files: tlwg/Sawasdee*.sfd +Copyright: 2007 Pol Udomwittayanukul +License: GPL-2+ with Font exception + +Files: tlwg/Umpush*.sfd +Copyright: 2003 National Electronics and Computer Technology Center +Copyright: Copyright 2007 Widhaya Trisarnwadhana +License: GPL-2+ with Font exception + +Files: tlwg/Waree*.sfd +Copyright: 2003 Bitstream, Inc. +License: other + Permission is hereby granted, free of charge, to any person obtaining + a copy of the fonts accompanying this license ("Fonts") and associated + documentation files (the "Font Software"), to reproduce and distribute + the Font Software, including without limitation the rights to use, + copy, merge, publish, distribute, and/or sell copies of the Font + Software, and to permit persons to whom the Font Software is furnished + to do so, subject to the following conditions: + . + The above copyright and trademark notices and this permission notice + shall be included in all copies of one or more of the Font Software + typefaces. + . + The Font Software may be modified, altered, or added to, and in + particular the designs of glyphs or characters in the Fonts may be + modified and additional glyphs or characters may be added to the + Fonts, only if the fonts are renamed to names not containing either + the words "Bitstream" or the word "Vera". + . + This License becomes null and void to the extent applicable to Fonts + or Font Software that has been modified and is distributed under the + "Bitstream Vera" names. + . + The Font Software may be sold as part of a larger software package + but no copy of one or more of the Font Software typefaces may be sold + by itself. + . + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL + BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, + OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT + SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + . + Except as contained in this notice, the names of Gnome, the Gnome + Foundation, and Bitstream Inc., shall not be used in advertising or + otherwise to promote the sale, use or other dealings in this Font + Software without prior written authorization from the Gnome Foundation + or Bitstream Inc., respectively. For further information, contact: + fonts at gnome dot org. + +License: GPL-2+ with Font exception + On Debian GNU/Linux systems, the complete text of the GNU General Public + License version 2 can be found in `/usr/share/common-licenses/GPL-2'. + . + As a special exception, if you create a document which uses this font, + and embed this font or unaltered portions of this font into the + document, this font does not by itself cause the resulting document + to be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the document might be + covered by the GNU General Public License. If you modify this font, + you may extend this exception to your version of the font, but you + are not obligated to do so. If you do not wish to do so, delete this + exception statement from your version. diff --git a/models/system.py b/models/system.py index c84b06c..9fa7ced 100644 --- a/models/system.py +++ b/models/system.py @@ -1,6 +1,6 @@ #from itsdangerous import TimedJSONWebSignatureSerializer as Serializer #from datetime import datetime -#from flask import current_app +from flask import current_app, url_for from flask_login import UserMixin from sqlalchemy.sql import func from sqlalchemy.dialects import postgresql, sqlite @@ -116,6 +116,41 @@ class Persona(Cuenta,UserMixin): def is_in(self, comision=0): return True + @property + def sidebar_menu(self): + import json + from .gestion import AccesoGestion + # Primer menu, de carrera Visión de jefe de carrera + amGestion = AccesoGestion() + + if amGestion.in_gestion(): + cat = u"Gobernanza" + links = [] + + for modulo in amGestion.get_nodes(): + links.append((modulo.nodobase.nombre, modulo.nodobase.tipo, modulo.nodobase.descripcion, url_for('gestion.main', uri=modulo.uri) )) + + if amGestion.is_admin(): + links.append((u'Comisiones','users-cog','gestion.manager', url_for('gestion.manager'))) + + if amGestion.sysadmin: + links.append((u'Módulos','boxes','gestion.modulos', url_for("gestion.modulos"))) + + if len(links) > 0: + yield(100, u"Dashboard", "tasks", cat, links) + + cat = "Información Oficial" # + links = [ + ("GTFS Estático", "map-marked-alt", "main.home", url_for("main.home")), + ("GTFS Dinamico", "satellite-dish", "main.home", url_for("main.home")), + ("Paradas", "store", "main.home", url_for("main.home")), + ("Rutas", "bus-alt", "main.home", url_for("main.home")), + ("Conductores", "user-alt", "main.home", url_for("main.home")), + ("Vehículo", "shuttle-van", "main.home", url_for("main.home")), + ("En construcción", "tools", "main.home", url_for("main.home")), +# ("Críticos", "user-injured", "main.home"), + ] + yield(200, "Gran Concepción", "city", cat, links) class Correo(db.Model): __tablename__ = 'correos' diff --git a/private-dynamic/content/gestion/routes.py b/private-dynamic/content/gestion/routes.py index dda77de..5216999 100644 --- a/private-dynamic/content/gestion/routes.py +++ b/private-dynamic/content/gestion/routes.py @@ -5,6 +5,9 @@ from webinterface import db from sqlalchemy.sql import func from webinterface.models.gestion import Objetivo, Comision, Miembro, Avance, Accion, AccesoGestion, ModuloGestion, AccesosModuloGestion, Acta, AnexosActa, MiembrosAsistentes, InvitadosAsistentes import datetime +import jinja2 +import base64 + gestion = Blueprint('gestion', __name__) @@ -13,21 +16,14 @@ gestion = Blueprint('gestion', __name__) def verifica_permisos(): pass -# @gestion.route("/gestion/nuevoobjetivo", methods=['POST']) -# def newsingle(): -# cid = int(request.form['responsable']) -# fid = int(request.form['id']) -# nombre = request.form['nombre'].strip() -# if fid > 0 and cid > 0 and nombre: -# fobj = Objetivo.query.get(fid) -# nobj = Objetivo(nombre=nombre, tipo=fobj.tipo, parentid=fid, estado=0, responsableid=cid) -# db.session.add(nobj) -# db.session.commit() -# flash(u'Elemento "{}" generado con exito.'.format(nombre),'success') -# else: -# flash(u'Los datos ingresados son inválidos.','danger') -# -# return redirect(url_for('gestion.manager')) +@jinja2.pass_context +@gestion.app_template_filter() +def b64encode(context, value): + if value is None: + return '' + else: + return base64.b64encode(value.encode("utf-8")).decode('utf-8') + @gestion.route("/objetivos/editmodulo", methods=['POST']) def editmodulo(): @@ -262,7 +258,7 @@ def syscomision(): personal.append(item.personaid) for personaid in personal: - from ilab_app.models.system import Persona + from webinterface.models.system import Persona theuser = Persona.query.get(personaid) comisionpersonal = Comision.query.filter(Comision.nombre=="Personal {}".format(theuser.login), Comision.creado==2).one_or_none() @@ -607,7 +603,7 @@ def subelogo(): if extension not in ['.png']: flash(u"Solo se aceptan imágenes formato PNG", 'warning') else: - from ilab_app.content.docs.utils import ingest_file + from webinterface.content.docs.utils import ingest_file (item, previtem) = ingest_file() if tipologo == 1: @@ -759,7 +755,7 @@ def reportexls(objetivoid): from openpyxl import Workbook - from ilab_app.models.system import Persona + from webinterface.models.system import Persona from openpyxl.utils import get_column_letter from tempfile import NamedTemporaryFile @@ -848,7 +844,7 @@ def acta_copiame(actaid, masivo=None): abort(403) from flask_mail import Message - from ilab_app import mail + from webinterface import mail from .reporte import ActaPDF from tempfile import NamedTemporaryFile import traceback diff --git a/private-dynamic/content/main.py b/private-dynamic/content/main.py index 46303b0..9bbd7a1 100644 --- a/private-dynamic/content/main.py +++ b/private-dynamic/content/main.py @@ -8,6 +8,7 @@ from webinterface.models.documentos import Documento from webinterface.models.gestion import Comision, Miembro, Objetivo from .utils import es_local import datetime +import markdown2 ## Core provee la funcionalidad basica de autentificación usando las credenciales de iLab @@ -24,7 +25,11 @@ def home(): @main.route("/dashboard") @login_required def dashboard(): - return render_template('dashboard.html', title='Dashboard') + msg = '''Bienvenidos, este sitio es un sistema de información automatizado del transporte público en el Gran Concepción. + +En el menú lateral, se muestran los diferentes módulos a los que tiene acceso y en caso de presentarse algun problema, favor indicarlo a soporte@ilab.cl. La plataforma está en desarrollo por lo que es posible que presente intermitencias hata su lanzamiento. +''' + return render_template('dashboard.html', title='Sistema de Gestión del Transporte Público', msg=markdown2.markdown(msg)) @main.route("/about") def about(): @@ -38,17 +43,10 @@ def login(): def logout(): return redirect('https://tpmc.ilab.cl/system/logout') -@main.route("/me") -@login_required -def me(): - image_file = url_for('static', filename='profile_pics/' + current_user.foto) - return render_template('system/me.html', title=u'¿Quién soy?', - image_file=image_file) - @main.before_app_first_request def init_database(): try: - db.drop_all() +# db.drop_all() db.create_all() id_internet = Identidad.query.filter(Identidad.login=='Internet').one_or_none() @@ -115,6 +113,10 @@ def init_database(): current_app.logger.debug(traceback.format_exc()) +@main.route('/favicon.ico') +def favicon(): + return send_from_directory(os.path.join(current_app.root_path, 'static'), 'favicon.ico', mimetype='image/vnd.microsoft.icon') + @main.before_app_request def registra_sesion(): diff --git a/private-dynamic/models/system.py b/private-dynamic/models/system.py deleted file mode 100644 index 46b5f26..0000000 --- a/private-dynamic/models/system.py +++ /dev/null @@ -1,281 +0,0 @@ -#from itsdangerous import TimedJSONWebSignatureSerializer as Serializer -#from datetime import datetime -#from flask import current_app -from flask_login import UserMixin - -from sqlalchemy.sql import func -from sqlalchemy.dialects import postgresql, sqlite -from webinterface import db - -@login_manager.user_loader -def load_user(user_id): - return Persona.query.filter(Persona.rut==user_id).one_or_none() - -class Persona(Cuenta,UserMixin): - __tablename__ = 'personas' - __table_args__ = { 'schema': 'usuarios' } - __bind_key__ = 'system' - - id = db.Column(db.BigInteger(), db.ForeignKey('usuarios.cuentas.id'), primary_key=True) - - nombres = db.Column(db.String(100), nullable=False) - apellidop = db.Column(db.String(100), nullable=False) - apellidom = db.Column(db.String(100)) - - rut = db.Column(db.String(20), unique=True, nullable=False) - telefono = db.Column(db.String(20), nullable=True) - foto = db.Column(db.String(50), nullable=False, default='default.jpg') - - __mapper_args__ = { - 'polymorphic_identity':'Persona' - } - - def get_id(self): - return self.rut - - @property - def nombrecompleto(self): - if self.apellidom is not None: - return u"{} {} {}.".format(self.nombres.partition(' ')[0], self.apellidop, self.apellidom[0]) - else: - return u"{} {}.".format(self.nombres.partition(' ')[0], self.apellidop) - - @property - def safe_nombrecompleto(self): - return "{}".format(self.nombrecompleto.encode('utf-8')) - @property - def ascii_nombrecompleto(self): - return unidecode.unidecode(self.nombrecompleto) - - def is_in(self, comision=0): - return True - - @property - def sidebar_menu(self): - import json - from .gestion import AccesoGestion - # Primer menu, de carrera Visión de jefe de carrera - amGestion = AccesoGestion() - - if amGestion.in_gestion(): - cat = u"Gestión" - links = [] - - for modulo in amGestion.get_nodes(): - links.append((modulo.nodobase.nombre, modulo.nodobase.tipo, modulo.nodobase.descripcion, url_for('gestion.main', uri=modulo.uri) )) - - -class Identidad(db.Model): - __tablename__ = 'identidades' - __table_args__ = { 'schema': 'usuarios' } - __bind_key__ = 'system' - - id = db.Column(db.BigInteger(), primary_key=True, autoincrement=True) - - login = db.Column(db.String(50), unique=True, nullable=False) - alias = db.Column(db.String(50)) - - creado = db.Column(db.DateTime(timezone=True), server_default=func.now()) - modificado = db.Column(db.DateTime(timezone=True), server_onupdate=func.now()) - - sesiones = db.relationship('Sesion', back_populates='identidad', lazy=True) - ubicaciones = db.relationship('Ubicacion', back_populates='identidad', lazy=True) - - tipo = db.Column(db.String(20)) - __mapper_args__ = { - 'polymorphic_identity':'Identidad', - 'polymorphic_on':tipo - - } - -class Cuenta(Identidad): - __tablename__ = 'cuentas' - __table_args__ = { 'schema': 'usuarios' } - __bind_key__ = 'system' - - id = db.Column(db.BigInteger(), db.ForeignKey('usuarios.identidades.id'), primary_key=True) - - clave = db.Column(db.String(60), nullable=False) - sysadmin = db.Column(db.Boolean, default=0) - ultimoacceso = db.Column(db.DateTime(timezone=True)) - - __mapper_args__ = { - 'polymorphic_identity':'Cuenta' - } - - correos = db.relationship('Correo', back_populates='cuenta', lazy=True) - tarjetas = db.relationship('Tarjeta', back_populates='cuenta', lazy=True) -# credenciales = db.relationship('Credencial', back_populates='cuenta', lazy=True) - - def set_default(self, correo): - for item in self.correos: - if correo == item: - correo.default = True - else: - correo.default = False - - @property - def correodefecto(self): - last = None - for item in self.correos: - if item.default == True: - return item - elif last is None: - last = item - - return last - - @correodefecto.setter - def correodefecto(self, correo): - if correo.cuenta != self: - pass - - for item in self.correos: - if item == correo: - item.default = True - else: - item.default = False - -class Correo(db.Model): - __tablename__ = 'correos' - __table_args__ = { 'schema': 'usuarios' } - __bind_key__ = 'system' - - id = db.Column(db.Integer, primary_key=True) - correo = db.Column(db.String(100), unique=True, nullable=False) - - cuentaid = db.Column(db.BigInteger(), db.ForeignKey('usuarios.cuentas.id'), nullable=False) - cuenta = db.relationship('Cuenta', back_populates='correos') - default = db.Column(db.Boolean, default=0) - - -class Sesion(db.Model): - __tablename__ = 'sesiones' - __table_args__ = { 'schema': 'registros' } - __bind_key__ = 'system' - - id = db.Column(db.BigInteger(), primary_key=True) - - identidadid = db.Column(db.BigInteger(), db.ForeignKey('usuarios.identidades.id'), nullable=False) - identidad = db.relationship('Identidad', back_populates='sesiones') - - dispositivoid = db.Column(db.Integer, db.ForeignKey('registros.dispositivos.id'), nullable=False) - dispositivo = db.relationship('Dispositivo') - - conexiones = db.relationship('Conexion') - - iniciada = db.Column(db.DateTime(timezone=True), server_default=func.now()) - ultimo = db.Column(db.DateTime(timezone=True), server_onupdate=func.now()) - - def __repr__(self): - return u"Session ('{}','{}','{}')".format(self.identidad.login, self.ipaddr.ipaddr, self.useragent.parsed_ua) - -class Conexion(db.Model): - __tablename__ = 'conexiones' - __table_args__ = { 'schema': 'registros' } - __bind_key__ = 'system' - - id = db.Column(db.BigInteger(), primary_key=True) - - ipaddrid = db.Column(db.Integer, db.ForeignKey('registros.ipaddrs.id'), nullable=False) - ipaddr = db.relationship('Ipaddr') - - sesionid = db.Column(db.Integer, db.ForeignKey('registros.sesiones.id'), nullable=False) - sesion = db.relationship('Sesion', back_populates='conexiones', lazy=True) - - iniciada = db.Column(db.DateTime(timezone=True), server_default=func.now()) - ultimo = db.Column(db.DateTime(timezone=True), server_onupdate=func.now()) - - __table_args__ = (db.UniqueConstraint('ipaddrid', 'sesionid', name='_una_ip_sesion_uc'),{ 'schema': 'registros' }) - -class Ubicacion(db.Model): - __tablename__ = 'ubicaciones' - __table_args__ = { 'schema': 'registros' } - __bind_key__ = 'system' - - id = db.Column(db.BigInteger(), primary_key=True) - - ipaddrid = db.Column(db.Integer, db.ForeignKey('registros.ipaddrs.id'), nullable=False) - ipaddr = db.relationship('Ipaddr') - - identidadid = db.Column(db.Integer, db.ForeignKey('usuarios.identidades.id'), nullable=False) - identidad = db.relationship('Identidad', back_populates='ubicaciones', lazy=True) - - descripcion = db.Column(db.String(200), nullable=True) - - iniciada = db.Column(db.DateTime(timezone=True), server_default=func.now()) - ultimo = db.Column(db.DateTime(timezone=True), server_onupdate=func.now()) - - __table_args__ = (db.UniqueConstraint('ipaddrid', 'identidadid', name='_una_ip_identidad_uc'),{ 'schema': 'registros' }) - -class Ipaddr(db.Model): - __tablename__ = 'ipaddrs' - __table_args__ = { 'schema': 'registros' } - __bind_key__ = 'system' - - id = db.Column(db.Integer, primary_key=True) - - ipaddr = db.Column(db.String(15).with_variant(postgresql.INET(), 'postgresql'), unique=True, nullable=False) - hostname = db.Column(db.String(100), nullable=True) - - def __repr__(self): - return "IpAddr('{}','{}')".format(self.ipaddr, self.hostname) - -class Dispositivo(db.Model): - __tablename__ = 'dispositivos' - __table_args__ = { 'schema': 'registros' } - __bind_key__ = 'system' - - id = db.Column(db.Integer, primary_key=True) - useragent = db.Column(db.String(1024), unique=True, nullable=False) - parsed_ua = db.Column(db.String(150)) - dev = db.Column(db.String(50)) - os = db.Column(db.String(50)) - browser = db.Column(db.String(50)) - - def __repr__(self): - return "Useragent('{}')".format(self.parsed_ua) - -class Ruta(db.Model): - __tablename__ = 'rutas' - __table_args__ = { 'schema': 'registros' } - __bind_key__ = 'system' - - id = db.Column(db.Integer, primary_key=True) - ruta = db.Column(db.String(100), unique=True, nullable=False) - - def __repr__(self): - return "Url('{}')".format(self.ruta) - -class Registro(db.Model): - __tablename__ = 'registros' - __table_args__ = { 'schema': 'registros' } - __bind_key__ = 'system' - - id = db.Column(db.BigInteger(), primary_key=True) - - sitioid = db.Column(db.Integer, db.ForeignKey('registros.sitios.id'), nullable=False) - sitio = db.relationship('Sitio') - - rutaid = db.Column(db.Integer, db.ForeignKey('registros.rutas.id'), nullable=False) - ruta = db.relationship('Ruta') - - sesionid = db.Column(db.BigInteger().with_variant(sqlite.INTEGER(), 'sqlite'), db.ForeignKey('registros.sesiones.id'), nullable=False) - sesion = db.relationship('Sesion') - - ipaddrid = db.Column(db.Integer, db.ForeignKey('registros.ipaddrs.id'), nullable=False) - ipaddr = db.relationship('Ipaddr') - - tamano = db.Column(db.Integer) - creado = db.Column(db.DateTime, server_default=func.now()) - - def __repr__(self): - return "Registro('{}')".format(self.ruta.ruta) - -class Sitio(db.Model): - __tablename__ = 'sitios' - __table_args__ = { 'schema': 'registros' } - __bind_key__ = 'system' - - id = db.Column(db.Integer, primary_key=True) - sitio = db.Column(db.String(100), unique=True, nullable=False) diff --git a/private-dynamic/requirements.txt b/private-dynamic/requirements.txt index 82d069f..00bfa8d 100644 --- a/private-dynamic/requirements.txt +++ b/private-dynamic/requirements.txt @@ -26,3 +26,4 @@ openpyxl fpdf Pillow PyPDF2<3 +markdown2 diff --git a/private-dynamic/static/favicon.ico b/private-dynamic/static/favicon.ico new file mode 100644 index 0000000..dddefa7 Binary files /dev/null and b/private-dynamic/static/favicon.ico differ diff --git a/private-dynamic/templates/dashboard.html b/private-dynamic/templates/dashboard.html index aceb1ae..ba5d5db 100644 --- a/private-dynamic/templates/dashboard.html +++ b/private-dynamic/templates/dashboard.html @@ -1,8 +1,6 @@ {% extends "layout.html" %} {% block content %} -
-

Sitio en Desarrollo

-

Bienvenido,

-

Actualmente nos encontramos desarrollando esta página, asi que es muy posible que no funcione correctamente. Cualquier problema que usted detecte, puede mencionarselo a israel.figueroa@ilab.cl para que lo corrija cuando tenga tiempo.

+
+{{ msg | safe}}
-{% endblock content %} \ No newline at end of file +{% endblock content %} diff --git a/private-dynamic/templates/layout.html b/private-dynamic/templates/layout.html index 78a40e1..a04b37b 100644 --- a/private-dynamic/templates/layout.html +++ b/private-dynamic/templates/layout.html @@ -14,7 +14,6 @@ {% else %} Gestión del Transporte Público del Gran Concepción {% endif %} - @@ -27,7 +26,7 @@
-